Re: [Chromium-users] Re: Chromium 1.9 second release candidate

Eric Sandall <[email protected]>
Newsgroups gmane.comp.graphics.chromium.devel,gmane.comp.graphics.chromium.user
Message-ID <Pine.LNX.4.64.0605241314010.364@cerberus>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, 24 May 2006, Brian Paul wrote:
> Eric Sandall wrote:
>> On Wed, 24 May 2006, Brian Paul wrote:
>>> Brian Paul wrote:
>>>> A second release candidate of Chromium 1.9 is ready at
>>>> http://chromium.sf.net/beta
>>>> 
>>>> This just accumulates a few more bugs fixes since the first RC.
>>> 
>>> I haven't seen any feedback on this, positive or negative.
>>> 
>>> It would be good to at least have a couple people confirm that they're 
>>> tried
>>> it and it's OK.
>>> 
>>> Thanks.
>> 
>> Trying to compile cr-1.9rc2 gives:
>> $ make
>> ...
>> Compiling state_program.c
>> cc1: warnings being treated as errors
>> state_program.c: In function ‘crStateGetVertexAttribivNV’:
>> state_program.c:1042: warning: ‘floatParams[0]’ is used
>> uninitialized in this function
>> state_program.c:1040: warning: ‘floatParams[1]’ may be used
>> uninitialized in this function
>> state_program.c:1040: warning: ‘floatParams[2]’ may be used
>> uninitialized in this function
>> state_program.c:1040: warning: ‘floatParams[3]’ may be used
>> uninitialized in this function
>> gmake[2]: *** [../built/crstate/Linux/state_program.o] Error 1
>> gmake[1]: *** [dep] Error 2
>> make: *** [state_tracker.subdir] Error 2
>> 
>> This is with gcc 4.1.0-3 on Fedora Core 5. If I remove -Werror from
>> configs/Linux.mk CXXFLAGS and CFLAGS cr-1.9rc2 compiles (I have not
>> tried running it yet).
>
> OK, I actually fixed the same problem in a different function and didn't 
> realize there was a second instance of it.
>
> The patch is attached.

Still gives:
Rebuilding dependencies for state_program.c
Compiling state_program.c
cc1: warnings being treated as errors
state_program.c: In function ‘crStateGetVertexAttribivARB’:
state_program.c:1099: warning: ‘floatParams[0]’ is used
uninitialized in this function
state_program.c:1097: warning: ‘floatParams[1]’ may be used
uninitialized in this function
state_program.c:1097: warning: ‘floatParams[2]’ may be used
uninitialized in this function
state_program.c:1097: warning: ‘floatParams[3]’ may be used
uninitialized in this function
gmake[2]: *** [../built/crstate/Linux/state_program.o] Error 1
gmake[1]: *** [dep] Error 2
make: *** [state_tracker.subdir] Error 2

And again when the above is fixed:
Rebuilding dependencies for state_program.c
Compiling state_program.c
cc1: warnings being treated as errors
state_program.c: In function ‘crStateGetVertexAttribdvARB’:
state_program.c:1113: warning: ‘floatParams[0]’ is used
uninitialized in this function
state_program.c:1111: warning: ‘floatParams[1]’ may be used
uninitialized in this function
state_program.c:1111: warning: ‘floatParams[2]’ may be used
uninitialized in this function
state_program.c:1111: warning: ‘floatParams[3]’ may be used
uninitialized in this function
gmake[2]: *** [../built/crstate/Linux/state_program.o] Error 1
gmake[1]: *** [dep] Error 2
make: *** [state_tracker.subdir] Error 2

Seems to be fixed in CVS. Attached is a patch (after applying yours)
that fixes the other two locations.

- -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)

iD8DBQFEdL/THXt9dKjv3WERAgeAAJ9RfL1vAsDNGxiJ/1C3HJ9RVIdgeQCfbCNG
GAsQAuWsKhyTqe7KW3io7kY=
=wh1q
-----END PGP SIGNATURE-----
state_program.patch (text/plain, 946 B)
--- state_tracker/state_program.c	2006-05-24 13:17:36.000000000 -0700
+++ /tmp/state_program.c	2006-05-24 13:16:42.000000000 -0700
@@ -1094,7 +1094,8 @@
 
 void STATE_APIENTRY crStateGetVertexAttribivARB(GLuint index, GLenum pname, GLint *params)
 {
-	 GLfloat floatParams[4];
+	 /* init vars to prevent compiler warnings/errors */
+	 GLfloat floatParams[4] = { 0.0, 0.0, 0.0, 0.0 };
 	 crStateGetVertexAttribfvARB(index, pname, floatParams);
 	 params[0] = (GLint) floatParams[0];
 	 if (pname == GL_CURRENT_VERTEX_ATTRIB_ARB) {
@@ -1107,7 +1108,8 @@
 
 void STATE_APIENTRY crStateGetVertexAttribdvARB(GLuint index, GLenum pname, GLdouble *params)
 {
-	 GLfloat floatParams[4];
+	 /* init vars to prevent compiler warnings/errors */
+	 GLfloat floatParams[4] = { 0.0, 0.0, 0.0, 0.0 };
 	 crStateGetVertexAttribfvARB(index, pname, floatParams);
 	 params[0] = floatParams[0];
 	 if (pname == GL_CURRENT_VERTEX_ATTRIB_ARB) {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.