The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: linux-kernel@vger.kernel.org,
	Vegard Nossum <vegard.nossum@gmail.com>,
	Eric B Munson <ebmunson@us.ibm.com>,
	Johannes Berg <johannes@sipsolutions.net>,
	Dave Airlie <airlied@linux.ie>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: v2.6.31-7381-g7fa0772: new build warnings: kmemcheck, __deprecated, hugetlb, radeon
Date: Wed, 23 Sep 2009 09:19:58 +0200	[thread overview]
Message-ID: <20090923091958.6a0f9d58@hyperion.delvare> (raw)
In-Reply-To: <4AB8FC88.8020608@s5r6.in-berlin.de>

Hi Stefan,

On Tue, 22 Sep 2009 18:34:16 +0200, Stefan Richter wrote:
> Latest git compiles with extreme noise:
> 
> In file included from include/net/inet_connection_sock.h:23,
>                   from include/linux/tcp.h:178,
>                   from include/linux/ipv6.h:215,
>                   from include/net/ipv6.h:16,
>                   from include/linux/sunrpc/clnt.h:25,
>                   from include/linux/nfs_fs.h:52,
>                   from kernel/sysctl.c:48:
> include/net/inet_sock.h: In function 'inet_reqsk_alloc':
> include/net/inet_sock.h:208: warning: ISO C90 forbids mixed declarations 
> and code
> 
> Vegard, this is obviously caused by commit 
> 45e3ff82708c65c895d5c5882aff17ecf62a80b5.

Actually not, it's caused by commit
181f7c5dd3832763bdf2756b6d2d8a49bdf12791
(kmemcheck: add missing braces to do-while in kmemcheck_annotate_bitfield)

And the fix would be:

From: Jean Delvare <khali@linux-fr.org>
Subject: Fix build warning in kmemcheck_annotate_bitfield

Fix the following build warning:

include/net/inet_sock.h: In function 'inet_reqsk_alloc':
include/net/inet_sock.h:208: warning: ISO C90 forbids mixed declarations 
and code

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
---
 include/linux/kmemcheck.h |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- linux-2.6.32-pre.orig/include/linux/kmemcheck.h	2009-09-23 08:19:34.000000000 +0200
+++ linux-2.6.32-pre/include/linux/kmemcheck.h	2009-09-23 09:05:30.000000000 +0200
@@ -145,10 +145,12 @@ static inline bool kmemcheck_is_obj_init
 
 #define kmemcheck_annotate_bitfield(ptr, name)				\
 	do {								\
+		int _n;							\
+									\
 		if (!ptr)						\
 			break;						\
 									\
-		int _n = (long) &((ptr)->name##_end)			\
+		_n = (long) &((ptr)->name##_end)			\
 			- (long) &((ptr)->name##_begin);		\
 		BUILD_BUG_ON(_n < 0);					\
 									\

-- 
Jean Delvare

  parent reply	other threads:[~2009-09-23  7:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-22 16:34 v2.6.31-7381-g7fa0772: new build warnings: kmemcheck, __deprecated, hugetlb, radeon Stefan Richter
2009-09-23  6:39 ` Johannes Berg
2009-09-23  7:19 ` Jean Delvare [this message]
2009-09-23  7:21   ` Pekka Enberg
2009-09-23 15:13     ` Stefan Richter
2009-09-23  8:19   ` Jean Delvare
2009-09-23  7:20 ` Pekka Enberg

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=20090923091958.6a0f9d58@hyperion.delvare \
    --to=khali@linux-fr.org \
    --cc=airlied@linux.ie \
    --cc=ebmunson@us.ibm.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stefanr@s5r6.in-berlin.de \
    --cc=torvalds@linux-foundation.org \
    --cc=vegard.nossum@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox