[Mesa-dev] [PATCH 2/6] nvc0: compile nve4_cache_name() only in debug build

Emil Velikov emil.l.velikov at gmail.com
Thu Apr 11 16:22:31 PDT 2013


As otherwise it is unused - pointed out by gcc

nve4_compute.c:586:20: warning: 'nve4_cache_split_name' defined but not used [-Wunused-function]
 static const char *nve4_cache_split_name(unsigned value)
                    ^

Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
 src/gallium/drivers/nvc0/nve4_compute.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/nvc0/nve4_compute.c b/src/gallium/drivers/nvc0/nve4_compute.c
index d7aa61e..2550530 100644
--- a/src/gallium/drivers/nvc0/nve4_compute.c
+++ b/src/gallium/drivers/nvc0/nve4_compute.c
@@ -583,6 +583,7 @@ nve4_compute_validate_textures(struct nvc0_context *nvc0)
 }
 
 
+#ifdef DEBUG
 static const char *nve4_cache_split_name(unsigned value)
 {
    switch (value) {
@@ -594,7 +595,6 @@ static const char *nve4_cache_split_name(unsigned value)
    }
 }
 
-#ifdef DEBUG
 static void
 nve4_compute_dump_launch_desc(const struct nve4_cp_launch_desc *desc)
 {
-- 
1.8.2.1



More information about the mesa-dev mailing list