Red Hat Bugzilla – Bug 116661
local variable used before set + printf problem
Last modified: 2007-11-30 17:10:37 EST
Description of problem:
I just tried to compile Core2 Test1 package XFree86-4.3.0-45.0.1
The compiler said
Actions.c(650): warning #268: the format string ends before this argument
The source code is
size = XmuSnprintf(msg, sizeof(msg), "%s(): bad number of
One % specifier, two trailing parameters. I'm not sure what the fix is
r200_pixel.c(183): remark #592: variable "size" is used before its
value is set
The source code is
if (!check_color(ctx, type, format, pack, pixels, size, pitch))
Suggest init size before first use.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Filed against Fedora Core 2, but Fedora Core 2 isn't released yet.
I'm assuming this was Fedora Core 2 test release number 1. Changing
Problem 1 above seems to not be present in Xorg-X11 in rawhide
currently. I checked both the Xaw and Xaw6 directories.
Problem 1 above, fixed in XFree86-4.3.0 in our internal CVS.
check_color( const GLcontext *ctx, GLenum type, GLenum format,
const struct gl_pixelstore_attrib *packing,
const void *pixels, GLint sz, GLint pitch )
The "sz" variable is not even used inside check_color() in
r200_pixel.c in 4.3.0. It's possible that the code was used
for something at one point, and then removed, with a few
things left behind.
I'm fixing the bug in 4.3.0 anyway, even though it is totally
harmless, but also removing this from being a Fedora Core 2
target bug, as it only affects XFree86 4.3.0, and we've switched
to Xorg X11.
Ok, fixed the r200 issue in both XFree86 4.3.0 in internal CVS,
and also xorg-x11 in CVS, so both fixes will be in all future
builds where relevant. Also emailed dri-devel to inquire about
the r200 issue since the code there seems bogus.
Will possibly update the r200 fixes based on DRI developer feedback.
Fixes merged in our internal CVS as per above, however after discussing
this with DRI developers, we've decided to remove the unused variables
in a future build, as they're not used anywhere in the sources.
Reopening to track, until I get it merged into DRI-CVS and xorg CVS.
This is in current X.Org for quite a while now...
closing as CURRENTRELEASE.