Bug 18204 - xorg-server log reports wrong resource ranges on 32Bit systems
Summary: xorg-server log reports wrong resource ranges on 32Bit systems
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: 7.4 (2008.09)
Hardware: x86 (IA32) All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2008-10-24 04:49 UTC by Peter Breitenlohner
Modified: 2008-12-01 02:47 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
patch to avoid some gcc warnings, reporting correct resource ranges (13.94 KB, patch)
2008-10-24 04:49 UTC, Peter Breitenlohner
no flags Details | Splinter Review

Description Peter Breitenlohner 2008-10-24 04:49:57 UTC
Created attachment 19848 [details] [review]
patch to avoid some gcc warnings, reporting correct resource ranges

Attached is a patch for xorg-server-1.5.2 to avoid various compiler warnings about format vs. argument type mismatches.

On our i686 (LE32) systems, one of them causes the server to report (Xorg.0.log)

PCI:*(0@1:0:0) Matrox Graphics, Inc. MGA G550 AGP rev 1, Mem @ 0xf8000000/0, 0xfbf00000/0, 0xfb000000/0, BIOS @ 0x????????/131072

instead of

PCI:*(0@1:0:0) Matrox Graphics, Inc. MGA G550 AGP rev 1, Mem @ 0xf8000000/33554432, 0xfbf00000/16384, 0xfb000000/8388608, BIOS @ 0x????????/131072
Comment 1 Paulo César Pereira de Andrade 2008-11-29 21:12:33 UTC
  Thanks for the patch. I applied most
of the changes to git master in commit
16b11cd03d8c5def07f0e598f237f71a37883a46

  Only did not apply the warnings about
format int but argument type is CARD32,
as those should be printed only when
debugging the code. The warning comes
of ''typedef unsigned long CARD32'', that
is conditional, and only on 64 bits
architectures it will be correctly defined
as ''typedef unsigned int CARD32''.
Comment 2 Peter Breitenlohner 2008-12-01 02:47:23 UTC
(In reply to comment #1)
>   Thanks for the patch. I applied most
> of the changes to git master in commit
> 16b11cd03d8c5def07f0e598f237f71a37883a46
> 
>   Only did not apply the warnings about
> format int but argument type is CARD32,
> as those should be printed only when
> debugging the code. The warning comes
> of ''typedef unsigned long CARD32'', that
> is conditional, and only on 64 bits
> architectures it will be correctly defined
> as ''typedef unsigned int CARD32''.
> 

Isn't it about time to change that as well on 32 bits, thereby getting rid of zillions of warnings (in case warnings are enabled)?

I don't think any Xorg program still compiles on systems where int is 16 bits.


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.