]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Portability fix: override compiler magic in understanding when a function is really...
authorFrancesco Chemolli <kinkie@squid-cache.org>
Thu, 17 Feb 2011 15:40:21 +0000 (16:40 +0100)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Thu, 17 Feb 2011 15:40:21 +0000 (16:40 +0100)
src/base/TextException.h

index 89f51680911b0ad222a968561b3730ca42b85a53..bbad80387aa8d447fe4bcbf1327462dc5194c3c7 100644 (file)
@@ -5,6 +5,9 @@
 
 #include <exception>
 
+#if __GNUC__
+__attribute__((unused))
+#endif
 static unsigned int FileNameHashCached(const char *fname);
 
 // simple exception to report custom errors
@@ -60,12 +63,6 @@ FileNameHashCached(const char *fname)
     return lastHash;
 }
 
-///  Avoids "defined but not used" warnings for FileNameHashCached
-class FileNameHashCacheUser
-{
-    bool use(void *ptr=NULL) { return ptr != &FileNameHashCached;}
-};
-
 #if !defined(TexcHere)
 #    define TexcHere(msg) TextException((msg), __FILE__, __LINE__, \
                                          (FileNameHashCached(__FILE__)<<14) | (__LINE__ & 0x3FFF))