[Mesa-dev] [PATCH mesa] mesa: suppress -Wundef warning for DEBUG_{FP, VP}
Eric Engestrom
eric.engestrom at imgtec.com
Tue Nov 28 15:49:41 UTC 2017
DEBUG_FP & DEBUG_VP were removed in 8c41a14c5ef0b8d2b0f1.
Changing #if to #ifdef silences the warnings, but I think one of these
options would be better:
- the code has been disabled to 12 years, we could just remove it.
- if the point is to have it in debug builds, we could s/DEBUG_.P/DEBUG/
The third option, which this patch does, is keep it as dead code, but it
can be enabled by adding a `#define DEBUG_{FP,VP}` locally.
Signed-off-by: Eric Engestrom <eric.engestrom at imgtec.com>
---
src/mesa/program/arbprogparse.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mesa/program/arbprogparse.c b/src/mesa/program/arbprogparse.c
index 83a501eea69884beffa4..5a6c8dbb1396a4113ebe 100644
--- a/src/mesa/program/arbprogparse.c
+++ b/src/mesa/program/arbprogparse.c
@@ -145,7 +145,7 @@ _mesa_parse_arb_fragment_program(struct gl_context* ctx, GLenum target,
_mesa_append_fog_code(ctx, program, fog_modes[state.option.Fog], GL_TRUE);
}
-#if DEBUG_FP
+#ifdef DEBUG_FP
printf("____________Fragment program %u ________\n", program->Id);
_mesa_print_program(&program->Base);
#endif
@@ -212,7 +212,7 @@ _mesa_parse_arb_vertex_program(struct gl_context *ctx, GLenum target,
_mesa_free_parameter_list(program->Parameters);
program->Parameters = prog.Parameters;
-#if DEBUG_VP
+#ifdef DEBUG_VP
printf("____________Vertex program %u __________\n", program->Id);
_mesa_print_program(program);
#endif
--
Cheers,
Eric
More information about the mesa-dev
mailing list