[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <200801142319.48150.bzolnier@gmail.com>
Date: Mon, 14 Jan 2008 23:19:48 +0100
From: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
To: Andy Whitcroft <apw@...dowen.org>
Cc: Randy Dunlap <rdunlap@...otime.net>,
Joel Schopp <jschopp@...tin.ibm.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH] scripts/checkpatch.pl: warn about using __FUNCTION__
__FUNCTION__ is gcc specific, __func__ is C99
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
---
scripts/checkpatch.pl | 5 +++++
1 file changed, 5 insertions(+)
Index: b/scripts/checkpatch.pl
===================================================================
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1557,6 +1557,11 @@ sub process {
if ($line =~ /\*\s*\)\s*k[czm]alloc\b/) {
WARN("unnecessary cast may hide bugs, see
http://c-faq.com/malloc/mallocnocast.html\n" . $herecurr);
}
+
+# check for gcc specific __FUNCTION__
+ if ($line =~ /__FUNCTION__/) {
+ WARN("__func__ should be used instead of gcc specific __FUNCTION__\n" . $herecurr);
+ }
}
# In mailback mode only produce a report in the negative, for
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists