All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@infradead.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: 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: Tue, 19 Oct 2010 11:11:52 -0200	[thread overview]
Message-ID: <20101019131152.GB3826@ghostprotocols.net> (raw)
In-Reply-To: <20101019114904.GB25371@elte.hu>

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. :)

- Arnaldo

  reply	other threads:[~2010-10-19 13:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-18 23:24 [PATCH] [PERF] (Userspace Tools) Fix a compilation error with -fstack-protector and -Werror 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 [this message]
2010-10-24 21:23               ` [PATCH] Fix a compile error with -fstack-protector, -Wstack-protector " Brian Gitonga Marete
2010-11-11 10:25               ` [PATCH] [PERF] (Userspace Tools) Fix a compilation error with -fstack-protector " Eric Dumazet
2010-11-11 17:05                 ` 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=20101019131152.GB3826@ghostprotocols.net \
    --to=acme@infradead.org \
    --cc=a.p.zijlstra@chello.nl \
    --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 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.