lkml.org 
[lkml]   [2011]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/9] trace: Fix uninitialized variable compiler warning
From
Date
On Mon, 2011-11-28 at 17:25 +0100, Jiri Olsa wrote:
>
> On Mon, Nov 28, 2011 at 11:19:18AM -0500, Steven Rostedt wrote:
> > On Sun, 2011-11-27 at 19:04 +0100, Jiri Olsa wrote:
> > > Initialize page2 variable to make compiler happy.
> >
> > What compiler is this? Because this is a compiler bug. In fact, there's
> > no check for page2 being NULL, so if it is used uninitialized it will
> > crash the kernel. I don't like these "make the compiler shut up" fixes,
> > because honestly, changes like this hide bugs.
>
> [jolsa@krava1 ~]$ gcc --version
> gcc (GCC) 4.4.5 20110214 (Red Hat 4.4.5-6)

Yep, that's an old compiler. The newer ones don't show this as an error.

-- Steve




\
 
 \ /
  Last update: 2011-11-28 20:37    [W:0.510 / U:0.700 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site