mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Arnaud Lacombe <lacombar@gmail.com>
Cc: stufever@gmail.com, linux-kernel@vger.kernel.org,
	Wang Shaoyan <wangshaoyan.pt@taobao.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Ingo Molnar <mingo@redhat.com>
Subject: Re: [PATCH] TRACING: Fix a copmile warning
Date: Mon, 25 Jul 2011 19:49:48 -0400	[thread overview]
Message-ID: <1311637788.3526.38.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <CACqU3MUKU_0FbOQT+TKLnnaoFVS_QOgzzx-tvunQy94v-eykTw@mail.gmail.com>

On Mon, 2011-07-25 at 18:38 -0400, Arnaud Lacombe wrote:
> Hi,
> 
> On Mon, Jul 25, 2011 at 4:19 PM, Steven Rostedt <rostedt@goodmis.org> wrote:
> > On Mon, 2011-07-25 at 15:43 -0400, Arnaud Lacombe wrote:
> >
> >> Actually, we have a special uninitialized_var(x) macro to handle such
> >> false positive. From include/linux/compiler-gcc.h:
> >>
> >> /*
> >>  * A trick to suppress uninitialized variable warning without generating any
> >>  * code
> >>  */
> >> #define uninitialized_var(x) x = x
> >
> > I'm aware of that too, but I think that is inappropriate as well. As I
> > said, some versions of gcc report it, others don't. Seems that gcc 4.6.0
> > says this is an error where 4.5.1 does not (I just tried both).
> >
> did you ? gcc 4.5.1 from Fedora 14 definitively shows the warning:

Heh, I didn't use Fedora's version. I wonder if they added a patch or
built it differently. I built my own 4.5.1 as well as my own 4.6.0.

-- Steve

> 
> # make ARCH=i386 kernel/trace/trace_printk.o V=1
> [...]
> gcc -Wp,-MD,kernel/trace/.trace_printk.o.d  -nostdinc -isystem
> /usr/lib/gcc/x86_64-redhat-linux/4.5.1/include [...] -c -o
> kernel/trace/trace_printk.o kernel/trace/trace_printk.c
> /src/linux/linux/kernel/trace/trace_printk.c: In function
> 'hold_module_trace_bprintk_format':
> /src/linux/linux/kernel/trace/trace_printk.c:52:8: warning: 'fmt' may
> be used uninitialized in this function
> 
> # gcc -v
> gcc -v
> Using built-in specs.
> COLLECT_GCC=gcc
> COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.5.1/lto-wrapper
> Target: x86_64-redhat-linux
> Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
> --infodir=/usr/share/info
> --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap
> --enable-shared --enable-threads=posix --enable-checking=release
> --with-system-zlib --enable-__cxa_atexit
> --disable-libunwind-exceptions --enable-gnu-unique-object
> --enable-linker-build-id
> --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,lto
> --enable-plugin --enable-java-awt=gtk --disable-dssi
> --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
> --enable-libgcj-multifile --enable-java-maintainer-mode
> --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
> --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic
> --with-arch_32=i686 --build=x86_64-redhat-linux
> Thread model: posix
> gcc version 4.5.1 20100924 (Red Hat 4.5.1-4) (GCC)
> 
>  - Arnaud



  reply	other threads:[~2011-07-25 23:49 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-18  9:40 stufever
2011-07-25 18:32 ` Steven Rostedt
2011-07-25 19:43   ` Arnaud Lacombe
2011-07-25 20:19     ` Steven Rostedt
2011-07-25 20:28       ` Arnaud Lacombe
2011-07-25 22:38       ` Arnaud Lacombe
2011-07-25 23:49         ` Steven Rostedt [this message]
2011-07-25 23:52           ` Arnaud Lacombe
2011-07-26  0:14             ` Steven Rostedt
2011-07-25 23:50         ` Arnaud Lacombe
2011-07-25 23:58           ` Arnaud Lacombe
2011-07-26  0:08             ` Steven Rostedt
2011-07-26  0:35           ` Steven Rostedt
2011-07-26  0:44             ` Ian Lance Taylor
2011-07-26  0:41           ` Ian Lance Taylor
2011-07-26  1:08             ` Arnaud Lacombe
2011-07-26  1:12               ` Steven Rostedt
2011-07-26  1:19                 ` Arnaud Lacombe
2011-07-26 20:43                   ` Jeff Law
2011-07-26  1:10             ` Steven Rostedt
2011-07-26  5:55               ` Ian Lance Taylor
2011-07-26 12:00   ` Paulo Marques
2011-07-26 13:18     ` Jesper Juhl
2011-07-26 13:32       ` Paulo Marques
2011-07-26 13:55         ` Steven Rostedt
  -- strict thread matches above, loose matches on Subject: below --
2011-07-18  9:35 stufever

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=1311637788.3526.38.camel@gandalf.stny.rr.com \
    --to=rostedt@goodmis.org \
    --cc=fweisbec@gmail.com \
    --cc=lacombar@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=stufever@gmail.com \
    --cc=wangshaoyan.pt@taobao.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

all inboxes | Powered by JetHome®