Fix OSX/clang compiler warning.
authorBrian Aker <brian@tangent.org>
Fri, 1 Mar 2013 01:28:00 +0000 (17:28 -0800)
committerBrian Aker <brian@tangent.org>
Fri, 1 Mar 2013 01:28:00 +0000 (17:28 -0800)
libhashkit/md5.cc

index cf68e3ca6dd2298c595ac9920952c3acbfe42ed9..ef8677666a22dcb3db6cbc7774fd928a6f112b63 100644 (file)
@@ -71,7 +71,13 @@ documentation and/or software.
 #include <string.h>
 #include <sys/types.h>
 
-#pragma GCC diagnostic ignored "-Wunsafe-loop-optimizations"
+#define GCC_VERSION (__GNUC__ * 10000 \
+                     + __GNUC_MINOR__ * 100 \
+                     + __GNUC_PATCHLEVEL__)
+
+#if GCC_VERSION > 40600
+# pragma GCC diagnostic ignored "-Wunsafe-loop-optimizations"
+#endif
 
 /* POINTER defines a generic pointer type */
 typedef unsigned char *POINTER;