Bug 15156

Summary: xorg/driver/xf86-video-intel - Compile warning fixes.
Product: xorg Reporter: Paulo César Pereira de Andrade <pcpa>
Component: Driver/intelAssignee: Wang Zhenyu <zhenyu.z.wang>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium Keywords: janitor, patch
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
0001-Compile-warning-fixes.patch none

Description Paulo César Pereira de Andrade 2008-03-20 21:20:33 UTC
Created attachment 15358 [details] [review]
0001-Compile-warning-fixes.patch

o Check for RANDR_GET_CRTC_INTERFACE before defining functions that
  are used only if it is defined.
o Declare a variable before code, and rename it from ret to xvmc_status
  to better describe it.
o if 0 some static functions not used.
o Don't declare some unused variables.
o Declare as static some functions that are used only in the file defining it.
o Add a default/fallback return True to the Bool function
  src/xvmc/intel_batchbuffer.c:intelInitBatchBuffer().
o Ansify src/xvmc/xf86dri.c.
o Add missing prototype to src/xvmc/xf86dri.h and follow pattern of other
  headers by adding "extern" before function prototype.


-
  Maybe I should wait some days before posting this patch, as the
xvmc code has been just added, and I believe still being worked on.
  But feel free to adapt the changes from this patch to the
current source without actually applying it; don't need to give
me credit, it is easy to just check some log files :-)

  With this patch it compiles with no warnings. The compiler flags
I used are:
-Wall -Wbad-function-cast -Wdeclaration-after-statement -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-aliasing -Wold-style-definition -Wpointer-arith -Wstrict-prototypes
Comment 1 Wang Zhenyu 2008-03-21 02:01:59 UTC
Thanks, all looks reasonable for me, will try to push it later.
Comment 2 Wang Zhenyu 2008-03-25 19:19:34 UTC
Pushed. Thanks!

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.