Factor CHECKED out of DEBUG so it can be set seperatly
authorMichael Niedermayer <michael@niedermayer.cc>
Sun, 19 Feb 2017 11:49:45 +0000 (12:49 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 19 Feb 2017 14:39:36 +0000 (15:39 +0100)
Suggested-by: Matt Wolenetz <wolenetz@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/flacdsp.c
libavutil/internal.h

index 180d4e7..52c3e32 100644 (file)
@@ -45,7 +45,7 @@
 
 // For debuging we use signed operations so overflows can be detected (by ubsan)
 // For production we use unsigned so there are no undefined operations
-#ifdef DEBUG
+#ifdef CHECKED
 #define SUINT   int
 #else
 #define SUINT   unsigned
index a19975d..4d1b3e2 100644 (file)
 #    define NDEBUG
 #endif
 
+#if defined(DEBUG) && !defined(CHECKED)
+#    define CHECKED
+#endif
+
 #include <limits.h>
 #include <stdint.h>
 #include <stddef.h>