Bug 3799

Summary: Compiling xorg (CVS HEAD) warns about unused variables
Product: xorg Reporter: Jhair Tocancipa Triana <jhair_tocancipa>
Component: * OtherAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED DUPLICATE QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: shawn.starr
Version: git   
Hardware: x86 (IA32)   
OS: Linux (All)   
URL: http://people.freenet.de/jtocancipa/xorg_patches/xorg-CVS-2005-07-16-drop-unused-vars.tgz
Whiteboard:
i915 platform: i915 features:
Bug Depends on: 4542    
Bug Blocks:    

Description Jhair Tocancipa Triana 2005-07-17 04:41:23 UTC
Compiling the xorg CVS sources (HEAD) gives lots of warnings about unused
variables (Toolchain: gcc (GCC) 4.0.1 (Debian 4.0.1-2) on Debian unstable). E.g.:

chooser.c: In function 'Hostselect':
chooser.c:1050: warning: unused variable 'newy'

Some variables are of external use or are #ifdeffed and those should not be touched.

I created some patches which clean up variables not used inside functions at
all. The patches (one per affected file) can be found compressed and packed in
the URL section of this bug. The patches where done against CVS HEAD on Sat Jul
16 2005. 

It would be nice if the code can be cleaned up, with the help of the patches.

Thanks!
Comment 1 Jhair Tocancipa Triana 2005-07-17 04:44:45 UTC
Created attachment 3097 [details]
Standalone testcase for the fbBlt() bug; link with /usr/X11R6/lib/modules/libfb.a

Oh, I wasn't aware I could attach files to bugzilla :), so I attach the patches
for the record and in case someone has problems accessing the URL.
Comment 2 Jhair Tocancipa Triana 2005-07-17 04:56:16 UTC
Created attachment 3098 [details] [review]
Patch that fixes the fbBlt() problem
Comment 3 Jhair Tocancipa Triana 2005-07-17 04:57:34 UTC
Created attachment 3099 [details] [review]
Fix for the problem
Comment 4 Alan Coopersmith 2005-10-05 15:16:03 UTC
The patches previously attached were lost in the bugzilla disk death, and the
web site listed is not responding.   Please re-attach the patches (sorry about
this - the disk responsible has been taken out and shot).
Comment 5 Shawn Starr 2005-10-06 16:54:16 UTC
This is part of 4542, using sparse finds a whole lot more.  
 
Please help with #4542. 

*** This bug has been marked as a duplicate of 4542 ***
Comment 6 Shawn Starr 2005-10-28 11:25:32 UTC
Reopening make it depend on 4542 and keep the bugs grouped so we can fix this
all at once.
Comment 7 Daniel Stone 2007-02-27 01:27:21 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 8 George - 2007-03-12 08:18:01 UTC
Closing due to the original patches being lost and inactivity.

*** This bug has been marked as a duplicate of bug 4542 ***

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.