On Thu, Sep 18, 2014 at 06:15:13PM -0700, Jason Gerecke wrote: > On Thu, Sep 18, 2014 at 3:07 PM, Peter Hutterer > <peter.hutte...@who-t.net> wrote: > > On Wed, Sep 17, 2014 at 07:11:25PM -0700, Jason Gerecke wrote: > >> Clang by default does not emit warnings for system headers, but > >> most includes will be added with '-I' which doesn't count as a > >> system header. This patch has them included with '-isystem' so > >> that we can more easily see problems with *our* code. > >> > >> Signed-off-by: Jason Gerecke <killert...@gmail.com> > >> --- > >> configure.ac | 3 +++ > >> 1 file changed, 3 insertions(+) > >> > >> diff --git a/configure.ac b/configure.ac > >> index 6faf58c..d6de0ff 100644 > >> --- a/configure.ac > >> +++ b/configure.ac > >> @@ -53,12 +53,15 @@ XPROTOS="xproto xext kbproto inputproto randrproto" > >> > >> # Obtain compiler/linker options from server and required extensions > >> PKG_CHECK_MODULES(XORG, [xorg-server >= 1.7.0] $XPROTOS) > >> +XORG_CFLAGS=`echo $XORG_CFLAGS | sed 's/-I/-isystem /'` > >> > >> # Obtain compiler/linker options for the xsetwacom tool > >> PKG_CHECK_MODULES(X11, x11 xi xrandr xinerama $XPROTOS) > >> +X11_CFLAGS=`echo $X11_CFLAGS | sed 's/-I/-isystem /'` > > > > libX11 headers are set in stone, but server headers and udev can be fixed. > > I'd rather use the error messages you got to fix the server headers than > > simply silencing them. > > > > NAK to this one from me, sorry. > > > > Cheers, > > Peter > > > > And here I thought I'd get a NAK for portability concerns or something...
gcc supports -isystem on RHEL6, that's pretty much my portability worries covered :) btw, on second glance, you probably want append /g to the sed string, otherwise you only replace the first include directive. > Good luck getting rid of all the "-Wpadded" warnings (Xauth.h seems to > do a good job ;)). For giggles, here's a list of top offenders by > file: > > 279 /usr/include/xorg/inputstr.h > 90 /usr/include/xorg/input.h > 81 /usr/include/xorg/scrnintstr.h > 36 /usr/include/xorg/xf86Xinput.h > 30 /usr/include/xorg/xkbsrv.h > 27 /usr/include/xorg/colormapst.h > 26 /usr/include/xorg/xkbstr.h > 18 /usr/include/xorg/privates.h > 18 /usr/include/xorg/dixstruct.h > 9 /usr/include/xorg/cursorstr.h > 9 /usr/include/xorg/client.h > 1 /usr/include/xorg/xf86str.h > 1 /usr/include/xorg/xf86Module.h I guess all of these should be fixable. dump the clang output into my inbox (off-list) and I'll have a look at them ReallySoon™. saves me setting up a clang build for now. Cheers, Peter ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that Matters. http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel