lkml.org 
[lkml]   [2000]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Result of compiling with `-W'
On Thu, Jul 13, 2000 at 11:50:46PM +0200, Ingo Oeser wrote:
> On Thu, Jul 13, 2000 at 05:20:52PM +0100, Alan Cox wrote:
> > > /* Register devices */
> > > - if ((card->audio1_num = register_sound_dsp(&emu10k1_audio_fops, -1)) < 0) {
> > > + if ((signed long)(card->audio1_num = register_sound_dsp(&emu10k1_audio_fops, -1)) < 0) {
> >
> > Fix the type of card->foo_num to be signed instead - the fix is right.
> >
>
> I disagree here. If you enumerate things, you have zero or more
> of them. _Never_ owe you (as the kernel) somebody a soundcard ;-)
>
> So fix is:
>
> signed long ret = register_sound_dsp(&emu10k1_audio_fops, -1);

BTW: Why signed long? Using signed keyword makes sense only for char, the
rest of the types are signed unless unsigned keyword is used.

Jakub

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.334 / U:0.936 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site