lkml.org 
[lkml]   [1998]   [Jan]   [24]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSat, 24 Jan 1998 03:20:04 -0600
FromMichael Elizabeth Chastain <>
SubjectRe: patch on 2.1.80, mostly to fix gcc complaints
Hi Andries,

> diff -u --recursive --new-file ../linux-2.1.80/linux/drivers/sound/audio.c ./linux/drivers/sound/audio.c
> --- ../linux-2.1.80/linux/drivers/sound/audio.c	Wed Jan 21 01:44:57 1998
> +++ ./linux/drivers/sound/audio.c	Fri Jan 23 23:07:00 1998
> @@ -350,7 +350,7 @@
>  int audio_ioctl(int dev, struct fileinfo *file_must_not_be_used,
>  		unsigned int cmd, caddr_t arg)
>  {
> -	int val, info, count;
> +	int val = 0, info, count;
>  	unsigned long flags;
>  	struct dma_buffparms *dmap;

Oops, this is a mistake.  case SNDCTL_DSP_GETCAPS is broken.  Now it
is still broken, but the compiler no longer warns about it.

The right fix is to kill 'info' and use 'val' all the way through
case SNDCTL_DSP_GETCAPS.  (And if you leave 'val' uninitialized, then
the compiler will issue warnings for bugs.)

Michael Chastain
<mailto:mec@shout.net>
"love without fear"

\
 
 \ /
  Last update: 2005-03-22 12:41    [W:0.063 / U:0.130 seconds]
©2003-2008 Jasper Spaans