mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Arnaldo Carvalho de Melo <acme@infradead.org>
Cc: Ingo Molnar <mingo@elte.hu>,
	Brian Gitonga Marete <marete@toshnix.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [PATCH] [PERF] (Userspace Tools) Fix a compilation error with -fstack-protector and -Werror
Date: Thu, 11 Nov 2010 11:25:35 +0100	[thread overview]
Message-ID: <1289471135.17691.1026.camel@edumazet-laptop> (raw)
In-Reply-To: <20101019131152.GB3826@ghostprotocols.net>

Le mardi 19 octobre 2010 à 11:11 -0200, Arnaldo Carvalho de Melo a
écrit :
> Em Tue, Oct 19, 2010 at 01:49:04PM +0200, Ingo Molnar escreveu:
> > 
> > * Brian Gitonga Marete <marete@toshnix.com> wrote:
> > 
> > > > OK. Now that I actually look closely at that fragment I can see its useless to 
> > > > create the automatic arrays. Local string literals would also work (i.e. just 
> > > > pass `"Yes"' and `"No"' to newtWinChoice). But can also do what you suggested if 
> > > > it is anticipated that they will be used somewhere else within the file at some 
> > > > other time -- Currently they are not.
> > > 
> > > Oops. Sorry. What I suggested won't work because of the -Wwrite-strings default 
> > > option. Which actually makes me understand why the original author of the code 
> > > made it the way it is. Your suggestion of file-scope, static does solve the 
> > > problem.
> > 
> > Btw., -Wwrite-strings has proven to be a really useful warning in practice, in that 
> > it ensured that we propagate string immutability/const-ness as widely as possible. 
> > This resulted is cleaner perf code in the long run.
> > 
> > Here we cannot fix the Newt prototype (it's an existing library outside of our 
> > control) to take a const so we have to do the (mild) workaround of moving it to file 
> > scope. (if this becomes common then we'd have to re-evaluate the use of this 
> > warning)
> > 
> > I think Arnaldo has plans to get rid of the libnewt dependency altogether - that 
> > might be a fix too.
> 
> Yeah, but for now I'll just reap the results of this long discussion
> about this issue. :)
> 

Hi Arnaldo

Sorry if I missed something, but current linux-2.6 tree has the problem.

Is the fix under control ?

Thanks !



  parent reply	other threads:[~2010-11-11 10:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-18 23:24 Brian Gitonga Marete
2010-10-18 23:38 ` Frederic Weisbecker
2010-10-19  0:06   ` Brian Gitonga Marete
2010-10-19  0:20     ` Frederic Weisbecker
2010-10-19  6:40     ` Ingo Molnar
2010-10-19  9:03       ` Américo Wang
2010-10-19 11:12       ` Brian Gitonga Marete
2010-10-19 11:33         ` Brian Gitonga Marete
2010-10-19 11:37           ` Brian Gitonga Marete
2010-10-19 11:49           ` Ingo Molnar
2010-10-19 13:11             ` Arnaldo Carvalho de Melo
2010-10-24 21:23               ` [PATCH] Fix a compile error with -fstack-protector, -Wstack-protector " Brian Gitonga Marete
2010-11-11 10:25               ` Eric Dumazet [this message]
2010-11-11 17:05                 ` [PATCH] [PERF] (Userspace Tools) Fix a compilation error with -fstack-protector " Arnaldo Carvalho de Melo
2010-11-11 17:13                   ` Eric Dumazet

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=1289471135.17691.1026.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@infradead.org \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marete@toshnix.com \
    --cc=mingo@elte.hu \
    /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®