All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@muc.de>
To: kernel-janitors@vger.kernel.org
Subject: Re: [KJ] janitor project: fix gcc 4 warnings
Date: Mon, 20 Dec 2004 07:10:49 +0000	[thread overview]
Message-ID: <20041220071049.GA30448@muc.de> (raw)
In-Reply-To: <20041219190903.GA30192@muc.de>

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

On Mon, Dec 20, 2004 at 12:15:39AM +0200, Alexey Dobriyan wrote:
> On Sunday 19 December 2004 21:09, Andi Kleen wrote:
> 
> > make allmodconfig
> > make CC=/usr/local/gcc4/bin/gcc 2>&1 | tee LOG
> 
>   CC      kernel/acct.o
> kernel/acct.c: In function ???encode_float???:
> kernel/acct.c:366: fatal error: internal consistency failure
> compilation terminated.

Looks like another gcc bug. I will file a gcc bug thanks. 

Just disable accounting in the .config to continue or use make -k 


> 
> here.
> 
> Maaaany "differ in signedness" warnings.

Yep, and some new "bla is uninitialized" warnings. Many of them 
are bogus, because gcc just cannot prove if a variable is 
uninitialized or not and it now does it for structure fields
too. Anyways, they all need to be examined and fixed.

> ===============================================================================
> init/main.c: In function ???maxcpus???:
> init/main.c:150: warning: pointer targets in passing argument 2 of ???get_option??? 
> differ in signedness
> ===============================================================================
> unsigned int maxcpus;
> int get_option(char **str, int *pint);
> ...
> get_option(&str, &max_cpus);
> ===============================================================================
> For example, this one should be left as is, shouldn't it?


The warning should be fixed, otherwise the warning noise will
hide real valuable warnings. It's a judgement call whether you
modify the function prototype or the argument. In this case
both would be possible. I would usually do the change that
requires less work (e.g. fix the argument in this case because
there are a lot more get_option callers). This means make maxcpus
an int. Please avoid adding casts if possible. 

-Andi


[-- Attachment #2: Type: text/plain, Size: 167 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors

  parent reply	other threads:[~2004-12-20  7:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-19 19:09 [KJ] janitor project: fix gcc 4 warnings Andi Kleen
2004-12-19 19:47 ` Matthew Wilcox
2004-12-19 20:03 ` Andi Kleen
2004-12-19 21:00 ` Tobias Klauser
2004-12-20  0:13 ` Adrian Bunk
2004-12-20  7:10 ` Andi Kleen [this message]
2004-12-20  8:03 ` Andi Kleen
2004-12-20  8:04 ` Andi Kleen
2004-12-20 12:31 ` Arnd Bergmann
2004-12-22 16:44 ` Kovarththanan Rajaratnam
2005-02-07 23:14 ` Randy.Dunlap
2007-02-15 19:34 ` devzero

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=20041220071049.GA30448@muc.de \
    --to=ak@muc.de \
    --cc=kernel-janitors@vger.kernel.org \
    /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.