Bug 15156 - xorg/driver/xf86-video-intel - Compile warning fixes.
Summary: xorg/driver/xf86-video-intel - Compile warning fixes.
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Wang Zhenyu
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords: janitor, patch
Depends on:
Blocks:
 
Reported: 2008-03-20 21:20 UTC by Paulo César Pereira de Andrade
Modified: 2008-03-25 19:19 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
0001-Compile-warning-fixes.patch (21.56 KB, patch)
2008-03-20 21:20 UTC, Paulo César Pereira de Andrade
no flags Details | Splinter Review

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.