hi folks,

i had a short go at the compile warnings, and i managed to shut the most
common one up (for my case). as you can see it requires
compiler-specific stuff, i filled in the GCC parts (as i have no other
compiler)

cu  robert

diff -ur cryptopp.orig/misc.h cryptopp/misc.h
--- cryptopp.orig/misc.h        2008-10-02 20:06:45.000000000 +0000
+++ cryptopp/misc.h     2008-10-02 20:42:33.000000000 +0000
@@ -48,11 +48,18 @@
        static char dummy[2*b-1];
 };
 
+
+#ifndef ATTRIBUTE_UNUSED
+#ifdef __GNUC__
+#define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
+#endif /* ATTRIBUTE_UNUSED for GCC */
+#endif /* ATTRIBUTE_UNUSED */
+
 #define CRYPTOPP_COMPILE_ASSERT(assertion) 
CRYPTOPP_COMPILE_ASSERT_INSTANCE(assertion, __LINE__)
 #if defined(CRYPTOPP_EXPORTS) || defined(CRYPTOPP_IMPORTS)
 #define CRYPTOPP_COMPILE_ASSERT_INSTANCE(assertion, instance)
 #else
-#define CRYPTOPP_COMPILE_ASSERT_INSTANCE(assertion, instance) static 
CompileAssert<(assertion)> CRYPTOPP_ASSERT_JOIN(cryptopp_assert_, instance)
+#define CRYPTOPP_COMPILE_ASSERT_INSTANCE(assertion, instance) static 
CompileAssert<(assertion)> CRYPTOPP_ASSERT_JOIN(cryptopp_assert_, instance) 
ATTRIBUTE_UNUSED
 #endif
 #define CRYPTOPP_ASSERT_JOIN(X, Y) CRYPTOPP_DO_ASSERT_JOIN(X, Y)
 #define CRYPTOPP_DO_ASSERT_JOIN(X, Y) X##Y

-- 
Robert Lemmen                               http://www.semistable.com 

Attachment: signature.asc
Description: Digital signature

Reply via email to