Mesa (master): util: Define dump_cpu only for DEBUG builds.

Vinson Lee vlee at kemper.freedesktop.org
Sun Aug 22 06:30:21 UTC 2010


Module: Mesa
Branch: master
Commit: 0f3b3751b8643352dcc242567b3696bd1505df1d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0f3b3751b8643352dcc242567b3696bd1505df1d

Author: Vinson Lee <vlee at vmware.com>
Date:   Sat Aug 21 23:28:52 2010 -0700

util: Define dump_cpu only for DEBUG builds.

dump_cpu is used only when DEBUG is defined.

Fixes the following GCC warning on builds without DEBUG defined.
util/u_cpu_detect.c:76: warning: 'debug_get_option_dump_cpu' defined but not used

---

 src/gallium/auxiliary/util/u_cpu_detect.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_cpu_detect.c b/src/gallium/auxiliary/util/u_cpu_detect.c
index f33d6b3..5d0b16d 100644
--- a/src/gallium/auxiliary/util/u_cpu_detect.c
+++ b/src/gallium/auxiliary/util/u_cpu_detect.c
@@ -73,7 +73,9 @@
 #endif
 
 
+#if DEBUG
 DEBUG_GET_ONCE_BOOL_OPTION(dump_cpu, "GALLIUM_DUMP_CPU", FALSE)
+#endif
 
 
 struct util_cpu_caps util_cpu_caps;




More information about the mesa-commit mailing list