[FFmpeg-cvslog] Factor CHECKED out of DEBUG so it can be set seperatly

Michael Niedermayer git at videolan.org
Sun Feb 19 17:01:27 EET 2017


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sun Feb 19 12:49:45 2017 +0100| [e8d4eacc07c61ae24f48451073a2620d8d257d33] | committer: Michael Niedermayer

Factor CHECKED out of DEBUG so it can be set seperatly

Suggested-by: Matt Wolenetz <wolenetz at google.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e8d4eacc07c61ae24f48451073a2620d8d257d33
---

 libavcodec/flacdsp.c | 2 +-
 libavutil/internal.h | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/libavcodec/flacdsp.c b/libavcodec/flacdsp.c
index 180d4e7..52c3e32 100644
--- a/libavcodec/flacdsp.c
+++ b/libavcodec/flacdsp.c
@@ -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
diff --git a/libavutil/internal.h b/libavutil/internal.h
index a19975d..4d1b3e2 100644
--- a/libavutil/internal.h
+++ b/libavutil/internal.h
@@ -30,6 +30,10 @@
 #    define NDEBUG
 #endif
 
+#if defined(DEBUG) && !defined(CHECKED)
+#    define CHECKED
+#endif
+
 #include <limits.h>
 #include <stdint.h>
 #include <stddef.h>



More information about the ffmpeg-cvslog mailing list