Bug 24396 - Compiler warnings in function 'intel_xvmc_dump_render'
Summary: Compiler warnings in function 'intel_xvmc_dump_render'
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: low trivial
Assignee: haihao
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2009-10-08 06:47 UTC by Thomas Arnhold
Modified: 2009-10-19 11:36 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
The patch which solves the warnings (1.65 KB, patch)
2009-10-08 06:47 UTC, Thomas Arnhold
no flags Details | Splinter Review
Done it with an integer cast (1.58 KB, patch)
2009-10-08 09:21 UTC, Thomas Arnhold
no flags Details | Splinter Review

Description Thomas Arnhold 2009-10-08 06:47:35 UTC
Created attachment 30159 [details] [review]
The patch which solves the warnings

If I compile the latest git version of xf86-video-intel GCC 4.4.1 warns about argument problems:

  CC    intel_xvmc_dump.o
intel_xvmc_dump.c: In function 'intel_xvmc_dump_render':
intel_xvmc_dump.c:78: warning: format '%d' expects type 'int', but argument 3 has type 'XID'
intel_xvmc_dump.c:99: warning: format '%d' expects type 'int', but argument 3 has type 'XID'
intel_xvmc_dump.c:102: warning: format '%d' expects type 'int', but argument 3 has type 'XID'
intel_xvmc_dump.c:105: warning: format '%d' expects type 'int', but argument 3 has type 'XID'

I solved this by using %p and and pointer address as argument (hopefully that's right).
Comment 1 Thomas Arnhold 2009-10-08 09:21:29 UTC
Created attachment 30166 [details] [review]
Done it with an integer cast

I think this is the better solution. (Or is %p-usage also right?)
Comment 2 Eric Anholt 2009-10-19 11:36:28 UTC
commit 751e0a3e4576bbf4bffa56bbd6d4de28f10db98e
Author: Thomas Arnhold <thomas@arnhold.org>
Date:   Mon Oct 19 11:35:30 2009 -0700

    Fix 64-bit compiler warnings in intel_xvmc_dump_render().
    
    Bug #24396.


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.