Messages in this thread | | | Subject | Re: [PATCH -mm] riva CalcStateExt gcc 4.1 warning fix | From | Alan Cox <> | Date | Wed, 10 May 2006 11:35:43 +0100 |
| |
On Maw, 2006-05-09 at 19:56 -0700, Daniel Walker wrote: > This could be a bug. The return from CalcVClock isn't checked > so the variables in questions could be random data .. > > Fixes the following warning, > > drivers/video/riva/riva_hw.c: In function 'CalcStateExt': > drivers/video/riva/riva_hw.c:1241: warning: 'p' may be used uninitialized in this function > drivers/video/riva/riva_hw.c:1241: warning: 'n' may be used uninitialized in this function > drivers/video/riva/riva_hw.c:1241: warning: 'm' may be used uninitialized in this function > drivers/video/riva/riva_hw.c:1241: warning: 'VClk' may be used uninitialized in this function
But zero isn't valid data. You need to fix the missing return check not hide the warnings. This goes for just about every patch in this series
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |