<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 14-02-07 07:10 PM, Keith Packard
wrote:<br>
</div>
<blockquote
cite="mid:1391818251-23487-1-git-send-email-keithp@keithp.com"
type="cite">
<pre wrap="">indirect_dispatch_swap.c, which is autogenerated from a mesa script,
contains the function 'bswap_CARD64', which is never used in the
file. While it would be nice to fix this upstream, that's "hard", so
this change causes these warnings to be ignored for just this
directory.
Signed-off-by: Keith Packard <a class="moz-txt-link-rfc2396E" href="mailto:keithp@keithp.com"><keithp@keithp.com></a>
---
glx/Makefile.am | 2 ++
1 file changed, 2 insertions(+)
diff --git a/glx/Makefile.am b/glx/Makefile.am
index 54e8140..9838581 100644
--- a/glx/Makefile.am
+++ b/glx/Makefile.am
@@ -27,6 +27,8 @@ if DRI2_AIGLX
AM_CPPFLAGS += -I$(top_srcdir)/hw/xfree86/dri2
endif
+AM_CFLAGS += -Wno-unused-function
+
indirect_sources = \
indirect_dispatch.c \
indirect_dispatch.h \
</pre>
</blockquote>
Works only for the GNU compiler.<br>
<br>
The util-macros XORG_COMPILER_FLAGS uses XORG_TESTSET_CFLAG to test
each flag we use for compiler support. This is the reason why you
see this type of line at configure time:<br>
<blockquote><tt>checking if gcc -std=gnu99 supports -Wall... yes</tt><br>
</blockquote>
To introduce a new compiler flag, add an XORG_TESTSET_CFLAG
statement in configure.ac such as:<br>
<blockquote><tt>XORG_TESTSET_CFLAG ([NO_UNUSED_FUNCTION</tt><tt>]</tt><tt>,
[-Wno-unused-function <solaris-equivalent-if-any>])</tt><tt>
</tt><br>
</blockquote>
Each flag is tested in the set and the first one that works is
accepted. In the Makefile:<br>
<blockquote>
<pre wrap="">+AM_CFLAGS += $(NO_UNUSED_FUNCTION)</pre>
</blockquote>
You should then see at config time:<br>
<blockquote><tt>checking if gcc -std=gnu99 supports -Wno-unused-function...
yes</tt><br>
</blockquote>
If there is no equivalent on Solaris, the variable <tt>NO_UNUSED_FUNCTION
</tt>will be empty. If -Wno-unused-function is accepted on Solaris,
it will be used.<br>
<br>
This is the first time a warning flag is added to the comprehensive
set we already provide through util-macros.<br>
<br>
<br>
<br>
</body>
</html>