[FFmpeg-devel] [PATCH]Silence some icc warnings for current versions

Carl Eugen Hoyos cehoyos
Mon Dec 22 01:15:18 CET 2008


Hi!

I hope you agree that it makes not much sense to define a preprocessor 
function to test __ICC against a constant.

Please comment, Carl Eugen
-------------- next part --------------
Index: libavutil/internal.h
===================================================================
--- libavutil/internal.h	(revision 16255)
+++ libavutil/internal.h	(working copy)
@@ -36,7 +36,7 @@
 #include "common.h"
 
 #ifndef attribute_align_arg
-#if AV_GCC_VERSION_AT_LEAST(4,2)
+#if (!defined(__ICC) || __ICC > 1100) && AV_GCC_VERSION_AT_LEAST(4,2)
 #    define attribute_align_arg __attribute__((force_align_arg_pointer))
 #else
 #    define attribute_align_arg
Index: libavutil/mem.h
===================================================================
--- libavutil/mem.h	(revision 16255)
+++ libavutil/mem.h	(working copy)
@@ -50,7 +50,7 @@
     #define av_malloc_attrib
 #endif
 
-#if AV_GCC_VERSION_AT_LEAST(4,3)
+#if (!defined(__ICC) || __ICC > 1100) && AV_GCC_VERSION_AT_LEAST(4,3)
     #define av_alloc_size(n) __attribute__((alloc_size(n)))
 #else
     #define av_alloc_size(n)
Index: libavutil/common.h
===================================================================
--- libavutil/common.h	(revision 16255)
+++ libavutil/common.h	(working copy)
@@ -76,7 +76,7 @@
 #endif
 
 #ifndef av_cold
-#if AV_GCC_VERSION_AT_LEAST(4,3)
+#if (!defined(__ICC) || __ICC > 1100) && AV_GCC_VERSION_AT_LEAST(4,3)
 #    define av_cold __attribute__((cold))
 #else
 #    define av_cold



More information about the ffmpeg-devel mailing list