* question about implicit decl in pcm_direct.c
@ 2007-01-08 14:41 Benoit Fouet
2007-01-08 15:27 ` Takashi Iwai
0 siblings, 1 reply; 4+ messages in thread
From: Benoit Fouet @ 2007-01-08 14:41 UTC (permalink / raw)
To: alsa-devel
[-- Attachment #1: Type: text/plain, Size: 324 bytes --]
when compiling, i got:
pcm_direct.c:898: warning: implicit declaration of function
`snd_pcm_hw_params_set_format_first'
I don't know how to fix it properly, so i ask if someone knows :)
there is also another warning about a comparison between int and
unsigned int that i "fixed" like in the attached patch.
Cheers,
Ben
[-- Attachment #2: pcm_direct.c.diff --]
[-- Type: text/plain, Size: 523 bytes --]
diff -r 8803655da809 src/pcm/pcm_direct.c
--- a/src/pcm/pcm_direct.c Mon Jan 8 15:07:02 2007 +0100
+++ b/src/pcm/pcm_direct.c Mon Jan 8 15:40:18 2007 +0100
@@ -887,7 +887,7 @@ int snd_pcm_direct_initialize_slave(snd_
snd_pcm_format_t format;
int i;
- for (i = 0; i < sizeof dmix_formats / sizeof dmix_formats[0]; ++i) {
+ for (i = 0; i < (int)(sizeof dmix_formats / sizeof dmix_formats[0]); ++i) {
format = dmix_formats[i];
ret = snd_pcm_hw_params_set_format(spcm, hw_params, format);
if (ret >= 0)
[-- Attachment #3: Type: text/plain, Size: 347 bytes --]
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
[-- Attachment #4: Type: text/plain, Size: 161 bytes --]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: question about implicit decl in pcm_direct.c
2007-01-08 14:41 question about implicit decl in pcm_direct.c Benoit Fouet
@ 2007-01-08 15:27 ` Takashi Iwai
2007-01-08 15:35 ` Benoit Fouet
0 siblings, 1 reply; 4+ messages in thread
From: Takashi Iwai @ 2007-01-08 15:27 UTC (permalink / raw)
To: Benoit Fouet; +Cc: alsa-devel
At Mon, 08 Jan 2007 15:41:21 +0100,
Benoit Fouet wrote:
>
> when compiling, i got:
>
> pcm_direct.c:898: warning: implicit declaration of function
> `snd_pcm_hw_params_set_format_first'
> I don't know how to fix it properly, so i ask if someone knows :)
The patch below should fix. Give it a try.
> there is also another warning about a comparison between int and
> unsigned int that i "fixed" like in the attached patch.
Well, this is a kind of GCC bug (not 100% but partially).
I guess the latest version of gcc won't complain about it.
Takashi
diff -r 8803655da809 src/pcm/pcm_direct.c
--- a/src/pcm/pcm_direct.c Mon Jan 08 15:07:02 2007 +0100
+++ b/src/pcm/pcm_direct.c Mon Jan 08 15:46:46 2007 +0100
@@ -895,7 +895,7 @@ int snd_pcm_direct_initialize_slave(snd_
}
if (ret < 0 && dmix->type != SND_PCM_TYPE_DMIX) {
/* TODO: try to choose a good format */
- ret = snd_pcm_hw_params_set_format_first(spcm, hw_params, &format);
+ ret = INTERNAL(snd_pcm_hw_params_set_format_first)(spcm, hw_params, &format);
}
if (ret < 0) {
SNDERR("requested or auto-format is not available");
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: question about implicit decl in pcm_direct.c
2007-01-08 15:27 ` Takashi Iwai
@ 2007-01-08 15:35 ` Benoit Fouet
2007-01-08 15:40 ` Takashi Iwai
0 siblings, 1 reply; 4+ messages in thread
From: Benoit Fouet @ 2007-01-08 15:35 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
Takashi Iwai wrote:
> At Mon, 08 Jan 2007 15:41:21 +0100,
> Benoit Fouet wrote:
>
>> when compiling, i got:
>>
>> pcm_direct.c:898: warning: implicit declaration of function
>> `snd_pcm_hw_params_set_format_first'
>> I don't know how to fix it properly, so i ask if someone knows :)
>>
>
> The patch below should fix. Give it a try.
>
it fixes (at least the compilation warning ;) )
>> there is also another warning about a comparison between int and
>> unsigned int that i "fixed" like in the attached patch.
>>
> Well, this is a kind of GCC bug (not 100% but partially).
> I guess the latest version of gcc won't complain about it.
>
>
ok, i can't try latest gcc's version, though.
Thanks,
Ben
> Takashi
>
> diff -r 8803655da809 src/pcm/pcm_direct.c
> --- a/src/pcm/pcm_direct.c Mon Jan 08 15:07:02 2007 +0100
> +++ b/src/pcm/pcm_direct.c Mon Jan 08 15:46:46 2007 +0100
> @@ -895,7 +895,7 @@ int snd_pcm_direct_initialize_slave(snd_
> }
> if (ret < 0 && dmix->type != SND_PCM_TYPE_DMIX) {
> /* TODO: try to choose a good format */
> - ret = snd_pcm_hw_params_set_format_first(spcm, hw_params, &format);
> + ret = INTERNAL(snd_pcm_hw_params_set_format_first)(spcm, hw_params, &format);
> }
> if (ret < 0) {
> SNDERR("requested or auto-format is not available");
>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: question about implicit decl in pcm_direct.c
2007-01-08 15:35 ` Benoit Fouet
@ 2007-01-08 15:40 ` Takashi Iwai
0 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2007-01-08 15:40 UTC (permalink / raw)
To: Benoit Fouet; +Cc: alsa-devel
At Mon, 08 Jan 2007 16:35:27 +0100,
Benoit Fouet wrote:
>
> Takashi Iwai wrote:
> > At Mon, 08 Jan 2007 15:41:21 +0100,
> > Benoit Fouet wrote:
> >
> >> when compiling, i got:
> >>
> >> pcm_direct.c:898: warning: implicit declaration of function
> >> `snd_pcm_hw_params_set_format_first'
> >> I don't know how to fix it properly, so i ask if someone knows :)
> >>
> >
> > The patch below should fix. Give it a try.
> >
> it fixes (at least the compilation warning ;) )
OK, now committed to HG tree. Thanks for checking.
Takashi
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-01-08 15:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-08 14:41 question about implicit decl in pcm_direct.c Benoit Fouet
2007-01-08 15:27 ` Takashi Iwai
2007-01-08 15:35 ` Benoit Fouet
2007-01-08 15:40 ` Takashi Iwai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.