Bug 24396

Summary: Compiler warnings in function 'intel_xvmc_dump_render'
Product: xorg Reporter: Thomas Arnhold <thomas-libo>
Component: Driver/intelAssignee: haihao <haihao.xiang>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: trivial    
Priority: low Keywords: patch
Version: git   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
The patch which solves the warnings
none
Done it with an integer cast none

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.