mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hugh Dickins <hugh@veritas.com>
To: Russell King <rmk+lkml@arm.linux.org.uk>
Cc: Matt Mackall <mpm@selenic.com>,
	akpm@osdl.org, manfred@colorfullife.com,
	linux-kernel@vger.kernel.org
Subject: Re: + shut-up-warnings-in-ipc-shmc.patch added to -mm tree
Date: Thu, 24 Nov 2005 20:28:35 +0000 (GMT)	[thread overview]
Message-ID: <Pine.LNX.4.61.0511242012380.9406@goblin.wat.veritas.com> (raw)
In-Reply-To: <20051124174622.GC18971@flint.arm.linux.org.uk>

On Thu, 24 Nov 2005, Russell King wrote:
> On Thu, Nov 24, 2005 at 08:00:12AM -0800, Matt Mackall wrote:
> 
> It seems that ({0;}) is used when something is expected to return zero.
> However, if it is used in a void context, gcc 4 generates an annoying
> warning.

Annoying indeed.

> > mm.h:
> > #define shm_lock(a, b) empty_int()
> > 
> > The typechecking is nice in theory, but in practice I don't think it
> > really makes a difference for stubbing things out.

I'm with Matt on the typechecking here, and at first liked his proposal;
but then dreaded a long line of empty_int_0(), empty_long_minus1(), ...
I suppose we could pass the return value as argument, but I rather lose
interest...

> Depends if you end up with "blah is unused" warnings instead.  It's
> all round _far_ safer to use the inline function method from that
> point of view.
> 
> Not that I particularly care, I just wanted to squash some of the
> rediculous number of warnings in the kernel and decided to hit the
> easy ones.  However, they're turning out to be real pigs instead. 8(

I have nothing constructive suggest, and withdraw my objection to your
patch; though I do hope someone else comes up with a brilliant idea.
Or, does the next version of gcc decide it was all a wrong turning?

Hugh

      reply	other threads:[~2005-11-24 20:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200511230413.jAN4DboR013036@shell0.pdx.osdl.net>
     [not found] ` <Pine.LNX.4.61.0511241235450.3504@goblin.wat.veritas.com>
2005-11-24 16:00   ` Matt Mackall
2005-11-24 16:07     ` Muli Ben-Yehuda
2005-11-24 16:26       ` Matt Mackall
2005-11-24 17:46     ` Russell King
2005-11-24 20:28       ` Hugh Dickins [this message]

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=Pine.LNX.4.61.0511242012380.9406@goblin.wat.veritas.com \
    --to=hugh@veritas.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manfred@colorfullife.com \
    --cc=mpm@selenic.com \
    --cc=rmk+lkml@arm.linux.org.uk \
    /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®