All of lore.kernel.org
 help / color / mirror / Atom feed
From: Con Kolivas <kernel@kolivas.org>
To: Arjan van de Ven <arjanv@redhat.com>
Cc: linux kernel mailing list <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>
Subject: Re: attribute warn_unused_result
Date: Tue, 07 Sep 2004 22:53:19 +1000	[thread overview]
Message-ID: <413DAF3F.8080909@kolivas.org> (raw)
In-Reply-To: <20040907124726.GF8237@devserv.devel.redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1286 bytes --]

Arjan van de Ven wrote:
> On Tue, Sep 07, 2004 at 10:43:51PM +1000, Con Kolivas wrote:
> 
>>Arjan van de Ven wrote:
>>
>>>On Tue, 2004-09-07 at 14:23, Con Kolivas wrote:
>>>
>>>
>>>>Gcc3.4.1 has recently been complaining of a number of unused results 
>>>
>>>>from function with attribute warn_unused_result set. I'm not sure of how 
>>>
>>>>you want to tackle this so I'm avoiding posting patches. Should we 
>>>>remove the attribute (seems the likely option) or set some dummy 
>>>>variable (sounds stupid now that I ask it).
>>>
>>>
>>>that attribute is supposed to only be set for functions you really ought
>>>to check the result for.... so how about checking/using the result ?
>>
>>I understand the concept... these are functions that seem to work fine 
>>without using the return value... unless of course the original coders 
>>aren't yet aware of that fact then I'm sorry. Here's the list just with 
>>my config on 2.6.9-rc1-bk13:
> 
> 
>>fs/binfmt_elf.c:273: warning: ignoring return value of `copy_to_user', 
>>declared with attribute warn_unused_result
> 
> 
> you really are supposed to use the return value of copy_to_user and friends.

Oh dear I hadn't looked at that. My tree must have been corrupted by 
reiser4 doing the in-out thing to me ;P. Excuse the noise.

Con

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]

  reply	other threads:[~2004-09-07 12:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-07 12:23 attribute warn_unused_result Con Kolivas
2004-09-07 12:38 ` Arjan van de Ven
2004-09-07 12:43   ` Con Kolivas
2004-09-07 12:47     ` Arjan van de Ven
2004-09-07 12:53       ` Con Kolivas [this message]
2004-09-07 13:04         ` Con Kolivas
2004-09-07 14:10           ` Jesper Juhl
2004-09-07 13:08     ` Jesper Juhl

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=413DAF3F.8080909@kolivas.org \
    --to=kernel@kolivas.org \
    --cc=akpm@osdl.org \
    --cc=arjanv@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /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.