Re: Re: [Chromium-dev] Chromium 1.9 second release candidate
Eric Sandall <[email protected]>
| Newsgroups | gmane.comp.graphics.chromium.user,gmane.comp.graphics.chromium.devel |
|---|---|
| Message-ID | <Pine.LNX.4.64.0605241424460.6058@cerberus> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wed, 24 May 2006, Michael Barnes wrote: > All, > > I may have a better patch attached. If -Werror is needed for building > cromium, then it might be better just to shut up gcc's bogus warning > about something that "may be used unitialized". The flag that shuts > this up is -Wno-uninitialized. IMO release code shouldn't use -Werror. ;) >> From gcc's manpage: > > These warnings are made optional because GNU CC is not smart > enough to see all the reasons why the code might be correct > despite appearing to have an error. > > Uninitialized variables are bugs. Warnings about them maybe being > uninitilized being turned into errors, when they are not unitialized, > is a waste of our time. > > Please consider the attached patch. > > The patch is against 1.8, but it should apply cleanly to 1.9. <snip> This may do better as I ran into another uninitialized error while compiling 1.9rc2: Rebuilding dependencies for wetspu_init.c Compiling wetspu.c cc1: warnings being treated as errors wetspu.c: In function ‘ComputeNormal’: wetspu.c:128: warning: ‘p1[2]’ may be used uninitialized in this function wetspu.c:128: warning: ‘p2[2]’ may be used uninitialized in this function wetspu.c:128: warning: ‘p3[2]’ may be used uninitialized in this function wetspu.c:128: warning: ‘p4[2]’ may be used uninitialized in this function gmake[3]: *** [../../built/wetspu/Linux/wetspu.o] Error 1 gmake[2]: *** [dep] Error 2 gmake[1]: *** [wet.subdir] Error 2 make: *** [spu.subdir] Error 2 Possibly more if I fix this one and let the compile continue. In case we are wanting to initialize everything, a patch is attached. - -sandalle - -- Eric Sandall | Source Mage GNU/Linux Developer [email protected] | http://www.sourcemage.org/ http://eric.sandall.us/ | SysAdmin @ Inst. Shock Physics @ WSU http://counter.li.org/ #196285 | http://www.shock.wsu.edu/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) iD8DBQFEdNDZHXt9dKjv3WERAsVJAJ0cLf51I6PR/TXUmBxm+YL8V/F7LgCdGivF APIugkUU0yCTO4vbOysQpNc= =eUhr -----END PGP SIGNATURE-----
wetspu.c.patch
(text/plain, 535 B)
diff -Naur cr-1.9.orig/spu/wet/wetspu.c cr-1.9/spu/wet/wetspu.c
--- cr-1.9.orig/spu/wet/wetspu.c 2006-05-24 14:19:25.000000000 -0700
+++ cr-1.9/spu/wet/wetspu.c 2006-05-24 14:29:18.000000000 -0700
@@ -125,7 +125,10 @@
static void ComputeNormal( int x, int y, float n[3] )
{
float len;
- float p1[3], p2[3], p3[3], p4[3];
+ float p1[3] = { 0.0, 0.0, 0.0 },
+ p2[3] = { 0.0, 0.0, 0.0 },
+ p3[3] = { 0.0, 0.0, 0.0 },
+ p4[3] = { 0.0, 0.0, 0.0 };
n[0] = n[1] = n[2] = 0;
p1[0] = (float) x-1;
p2[0] = (float) x;