changeset 661:ac3fc6cb4781 libavutil

av_uninit() to suppress false uninitialized warnings from gcc without deoptimizing code.
author michael
date Mon, 09 Feb 2009 21:47:05 +0000
parents 396c27769b0e
children 1ed74ddc5e6b
files common.h
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/common.h	Sun Feb 08 21:23:15 2009 +0000
+++ b/common.h	Mon Feb 09 21:47:05 2009 +0000
@@ -93,6 +93,14 @@
 #endif
 #endif
 
+#ifndef av_uninit
+#if defined(__GNUC__)
+#    define av_uninit(x) x=x
+#else
+#    define av_uninit(x) x
+#endif
+#endif
+
 //rounded division & shift
 #define RSHIFT(a,b) ((a) > 0 ? ((a) + ((1<<(b))>>1))>>(b) : ((a) + ((1<<(b))>>1)-1)>>(b))
 /* assume b>0 */