Re: [tip:perfcounters/core] perf: Enable more compiler warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Frederic Weisbecker <fweisbec@xxxxxxxxx> wrote:

> On Sun, Aug 16, 2009 at 08:57:54AM +0000, tip-bot for Ingo Molnar wrote:
> > Commit-ID:  83a0944fa919fb2ebcfc1f8933d86e437b597ca6
> > Gitweb:     http://git.kernel.org/tip/83a0944fa919fb2ebcfc1f8933d86e437b597ca6
> > Author:     Ingo Molnar <mingo@xxxxxxx>
> > AuthorDate: Sat, 15 Aug 2009 12:26:57 +0200
> > Committer:  Ingo Molnar <mingo@xxxxxxx>
> > CommitDate: Sun, 16 Aug 2009 10:47:47 +0200
> > 
> > perf: Enable more compiler warnings
> > 
> > Related to a shadowed variable bug fix Valdis Kletnieks noticed
> > that perf does not get built with -Wshadow, which could have
> > helped us avoid the bug.
> > 
> > So enable -Wshadow and also enable the following warnings on
> > perf builds, in addition to the already enabled -Wall -Wextra
> > -std=gnu99 warnings:
> > 
> >  -Wcast-align
> >  -Wformat=2
> 
> 
> I also have code like the following from perf trace:
> 
> char format[32];
> [...]
> 
> memcpy(format, dynamic_built_format, ...)
> 
> printf(format, ....)
> 
> And that triggers warnings like that:
> 
> util/trace-event-parse.c:2280: error: format is not a literal string, argument types can't be checked
> 
> Do we also want these?
> 
> ftrace uses dynamic format definition, and it's a natural way to 
> copy them from debugfs and then used like that.
> 
> Especially here perf trace checked the format against bad things.

ok, lets turn the format warnings off.

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux