All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Mikael Pettersson <mikpe@it.uu.se>, "H. Peter Anvin" <hpa@zytor.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: "eliminate warn_on_slowpath()" change causes many gcc-3.2.3 warnings
Date: Sat, 17 Jan 2009 17:18:17 +0100	[thread overview]
Message-ID: <20090117161817.GA10825@elte.hu> (raw)
In-Reply-To: <200901171519.n0HFJZuf028704@harpo.it.uu.se>


* Mikael Pettersson <mikpe@it.uu.se> wrote:

> Commit ec5679e513305f1411753e5f5489935bd638af23 "eliminate warn_on_slowpath()"
> changed __WARN() to call warn_slowpath() with a NULL value for the format
> string parameter. Now every WARN_ON() triggers a warning from gcc-3.2.3:
> 
> In file included from include/linux/kmod.h:22,
>                  from include/linux/module.h:13,
>                  from include/linux/crypto.h:21,
>                  from arch/x86/kernel/asm-offsets_32.c:7,
>                  from arch/x86/kernel/asm-offsets.c:2:
> include/linux/gfp.h: In function `allocflags_to_migratetype':
> include/linux/gfp.h:104: warning: null format string
> 
> Compiling kernel 2.6.29-rc2 with a minimalistic .config for my 486
> generates 1767 'null format string' warnings.
> 
> warn_slowpath() is declared with attribute((format(printf, 3, 4))),
> and gcc-3.2.3 warns if the format string parameter is NULL. gcc-3.3
> and newer do not warn in that case.
> 
> Since gcc-3.2 is still a supported compiler for the kernel, this is
> a regression.
> 
> (Just FYI. I don't consider this serious enough to warrant reverting 
> that cleanup patch or declaring gcc-3.2.3 too old. I can always update 
> my 486 to gcc-3.3.6 if the warnings start to bug me too much.)

hm, that's unfortunate. GCC seems totally on crack for not accepting a 
NULL format string.

	Ingo

  reply	other threads:[~2009-01-17 16:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-17 15:19 "eliminate warn_on_slowpath()" change causes many gcc-3.2.3 warnings Mikael Pettersson
2009-01-17 16:18 ` Ingo Molnar [this message]
2009-01-17 20:01   ` H. Peter Anvin
2009-01-17 20:44     ` Kyle McMartin
2009-01-17 20:57       ` Kyle McMartin
2009-01-17 21:07       ` H. Peter Anvin
2009-01-17 21:38         ` Kyle McMartin
2009-01-17 23:37       ` Linus Torvalds
2009-01-17 23:40         ` H. Peter Anvin
2009-01-18  0:01           ` Linus Torvalds
2009-01-18  0:10             ` H. Peter Anvin

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=20090117161817.GA10825@elte.hu \
    --to=mingo@elte.hu \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikpe@it.uu.se \
    /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.