Bug 116661 - local variable used before set + printf problem
local variable used before set + printf problem
Product: Fedora
Classification: Fedora
Component: XFree86 (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: X/OpenGL Maintenance List
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2004-02-24 04:07 EST by d.binderman
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-10-12 13:16:35 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description d.binderman 2004-02-24 04:07:54 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
                     action_name, action_name);

One % specifier, two trailing parameters. I'm not sure what the fix is
for this.


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

How reproducible:

Steps to Reproduce:
Actual results:

Expected results:

Additional info:
Comment 1 Mike A. Harris 2004-03-12 21:06:25 EST
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
Comment 2 Mike A. Harris 2004-03-24 17:26:49 EST
Problem 1 above seems to not be present in Xorg-X11 in rawhide
currently.  I checked both the Xaw and Xaw6 directories.
Comment 3 Mike A. Harris 2004-03-26 02:38:17 EST
Problem 1 above, fixed in XFree86-4.3.0 in our internal CVS.
Comment 4 Mike A. Harris 2004-03-26 03:49:20 EST
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.
Comment 5 Mike A. Harris 2004-03-26 04:25:49 EST
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.
Comment 6 Mike A. Harris 2004-03-30 03:03:17 EST
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.
Comment 7 Mike A. Harris 2004-10-12 13:16:35 EDT
This is in current X.Org for quite a while now...


Note You need to log in before you can comment on or make changes to this bug.