[master] 88039bb Use the right attribute for __unused with gcc

Tollef Fog Heen tfheen at varnish-cache.org
Mon Jul 1 14:28:36 CEST 2013


commit 88039bb36f792cc89a76453040b09d6fe104f707
Author: Tollef Fog Heen <tfheen at varnish-software.com>
Date:   Mon Jul 1 14:28:05 2013 +0200

    Use the right attribute for __unused with gcc

diff --git a/include/vdef.h b/include/vdef.h
index 89694b2..2a0addb 100644
--- a/include/vdef.h
+++ b/include/vdef.h
@@ -67,6 +67,14 @@
 # endif
 #endif
 
+#ifndef __unused
+# if __GNUC_PREREQ(2, 95) || defined(__INTEL_COMPILER)
+#  define __unused __attribute__((__unused__))
+# else
+#  define __unused
+# endif
+#endif
+
 /**********************************************************************
  * FlexeLint and compiler shutuppery
  */



More information about the varnish-commit mailing list