public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjan@infradead.org>
To: Jan Engelhardt <jengelh@linux01.gwdg.de>
Cc: Muli Ben-Yehuda <muli@il.ibm.com>,
	"Moore, Robert" <robert.moore@intel.com>,
	Andrew Morton <akpm@osdl.org>, Len Brown <lenb@kernel.org>,
	"Brown, Len" <len.brown@intel.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	ACPI List <linux-acpi@vger.kernel.org>
Subject: Re: [PATCH] Cast removal
Date: Fri, 06 Oct 2006 22:39:13 +0200	[thread overview]
Message-ID: <1160167153.3000.118.camel@laptopd505.fenrus.org> (raw)
In-Reply-To: <Pine.LNX.4.61.0610062211220.30417@yvahk01.tjqt.qr>

On Fri, 2006-10-06 at 22:18 +0200, Jan Engelhardt wrote:
> >> -	(void) kmem_cache_destroy(cache);
> >> +	kmem_cache_destroy(cache);
> >> 
> >> I believe that the point of the (void) is to prevent lint from
> >> squawking, and perhaps some picky ANSI-C compilers. What is the overall
> >> Linux policy on this?
> >
> >IMHO there's another reason to do this which is much more relevant: it
> >tells the reader that whoever wrote it knows that it returns a value
> >and ignores it on purpose.
> 
> And GCC does not care about that, i.e. it still prints foritfy warnings, 
> as in:
> 
> $ svn co https://svn.sourceforge.net/svnroot/ttyrpld/trunk a && cd a
> $ make user/rpld.o EXT_CFLAGS="-D_FORTIFY_SOURCE=2"
> user/rpld.c:425: warning: ignoring return value of ‘write’, declared 
> with attribute warn_unused_result

this is by design. __must_check means you MUST do it.


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

  parent reply	other threads:[~2006-10-06 20:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-05 22:14 [PATCH] Cast removal Moore, Robert
2006-10-05 22:26 ` Andrew Morton
2006-10-06  5:34   ` Jan Engelhardt
2006-10-06 14:35 ` Muli Ben-Yehuda
2006-10-06 20:18   ` Jan Engelhardt
2006-10-06 20:30     ` Muli Ben-Yehuda
2006-10-06 20:39     ` Arjan van de Ven [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-10-05 22:23 Brown, Len
2006-10-05 15:45 Moore, Robert
2006-10-04 21:40 Moore, Robert
2006-10-05  0:28 ` Andrew Morton
2006-09-30 22:28 Jan Engelhardt
2006-10-05  3:56 ` Len Brown
2006-10-05  4:12   ` Andrew Morton
2006-10-05  4:43     ` Len Brown
2006-10-05  5:19       ` Andrew Morton
2006-10-05  8:00         ` Jan Engelhardt

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=1160167153.3000.118.camel@laptopd505.fenrus.org \
    --to=arjan@infradead.org \
    --cc=akpm@osdl.org \
    --cc=jengelh@linux01.gwdg.de \
    --cc=len.brown@intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=muli@il.ibm.com \
    --cc=robert.moore@intel.com \
    /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