lkml.org 
[lkml]   [2002]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectcompile warning fix for smb_debug.h
Hi,
attached is a fix for gcc 3.2 deprecated usage warnings for __FUNCTION__
in smb_debug.h. As gcc 2.95.3 doesn't issue the warning and can't handle
the new macro there's a macro selection based on the compiler major
version. Patch is against 2.4.20pre7.
--
Andreas Steinmetz
D.O.M. Datenverarbeitung GmbH
--- fs/smbfs/smb_debug.h.orig 2001-01-01 18:57:08.000000000 +0100
+++ fs/smbfs/smb_debug.h 2002-09-13 19:23:11.000000000 +0200
@@ -10,15 +10,24 @@
* safety checks that should never happen ???
* these are normally enabled.
*/
+
#ifdef SMBFS_PARANOIA
+#if __GNUC__>=3
+#define PARANOIA(fmt,x...) printk(KERN_NOTICE "%s: " fmt, __FUNCTION__, ##x)
+#else
#define PARANOIA(x...) printk(KERN_NOTICE __FUNCTION__ ": " x)
+#endif
#else
#define PARANOIA(x...) do { ; } while(0)
#endif

/* lots of debug messages */
#ifdef SMBFS_DEBUG_VERBOSE
+#if __GNUC__>=3
+#define VERBOSE(fmt,x...) printk(KERN_DEBUG "%s: " fmt, __FUNCTION__, ##x)
+#else
#define VERBOSE(x...) printk(KERN_DEBUG __FUNCTION__ ": " x)
+#endif
#else
#define VERBOSE(x...) do { ; } while(0)
#endif
@@ -28,7 +37,11 @@
* too common name.
*/
#ifdef SMBFS_DEBUG
+#if __GNUC__>=3
+#define DEBUG1(fmt,x...) printk(KERN_DEBUG "%s: " fmt, __FUNCTION__, ##x)
+#else
#define DEBUG1(x...) printk(KERN_DEBUG __FUNCTION__ ": " x)
+#endif
#else
#define DEBUG1(x...) do { ; } while(0)
#endif
\
 
 \ /
  Last update: 2005-03-22 13:28    [W:0.056 / U:0.628 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site