Bug 38238

Summary: [PATCH xf86-video-ati]: Fix 2424 lines of compiler warnings
Product: xorg Reporter: Johannes Obermayr <johannesobermayr>
Component: Driver/RadeonAssignee: xf86-video-ati maintainers <xorg-driver-ati>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: minor    
Priority: medium    
Version: git   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Patch
none
patch to silence compiler warings
none
Alternate patch to silence warnings none

Description Johannes Obermayr 2011-06-13 04:11:49 UTC
Created attachment 47892 [details] [review]
Patch

Since my email sent to xorg-driver-ati mailing list has not been accepted/published for more than a week (http://lists.x.org/archives/xorg-driver-ati/2011-June/020353.html):

Further information:
http://comments.gmane.org/gmane.linux.ide/46629

and

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b429dd5998d
6037e0057564f3894f56aff64d661
Comment 1 Alex Deucher 2011-06-13 07:18:52 UTC
This patch has come up a number of times in the past since gcc started warning about this (it didn't used to when the code was written).  I'd rather seem a nicer, sustainable fix (converting to defines or something) than casting to ints everywhere.
Comment 2 Marc Dietrich 2011-06-14 08:07:19 UTC
Created attachment 47962 [details] [review]
patch to silence compiler warings

here you go
Comment 3 Trevour Crow 2011-06-14 08:45:29 UTC
Created attachment 47964 [details] [review]
Alternate patch to silence warnings

The number of casts involved in Marc's patch got me to thinking that using a temporary variable might be cleaner. The attached patch also uses the opportunity to line up backslashes in the macros.
Comment 4 Johannes Obermayr 2011-08-18 09:42:41 UTC
ping!
Comment 5 Michel Dänzer 2011-08-18 10:14:46 UTC
Thanks for the patches, guys, but I took Alex's suggestion and converted the register ranges to defines.

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.