All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Steinmetz <ast@domdv.de>
To: urban@teststation.com
Cc: linux-kernel@vger.kernel.org
Subject: compile warning fix for smb_debug.h
Date: Fri, 13 Sep 2002 19:38:49 +0200	[thread overview]
Message-ID: <3D8222A9.8010409@domdv.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 311 bytes --]

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

[-- Attachment #2: smb_debug.h.diff --]
[-- Type: text/plain, Size: 1062 bytes --]

--- 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

             reply	other threads:[~2002-09-13 17:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-13 17:38 Andreas Steinmetz [this message]
2002-09-14  8:28 ` compile warning fix for smb_debug.h Urban Widmark
2002-09-14  8:53   ` Andreas Steinmetz
2002-09-14 23:21   ` David Weinehall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3D8222A9.8010409@domdv.de \
    --to=ast@domdv.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=urban@teststation.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.