From: Con Kolivas <kernel@kolivas.org>
To: 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:43:51 +1000 [thread overview]
Message-ID: <413DAD07.3030306@kolivas.org> (raw)
In-Reply-To: <1094560688.2801.11.camel@laptop.fenrus.com>
[-- Attachment #1: Type: text/plain, Size: 2336 bytes --]
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:
sound/core/seq/seq_clientmgr.c: In function `snd_seq_read':
sound/core/seq/seq_clientmgr.c:423: warning: ignoring return value of
`copy_to_user', declared with attribute warn_unused_result
fs/binfmt_elf.c: In function `padzero':
fs/binfmt_elf.c:113: warning: ignoring return value of `clear_user',
declared with attribute warn_unused_result
include/asm/uaccess.h: In function `create_elf_tables':
fs/binfmt_elf.c:175: warning: ignoring return value of `__copy_to_user',
declared with attribute warn_unused_result
fs/binfmt_elf.c:273: warning: ignoring return value of `copy_to_user',
declared with attribute warn_unused_result
fs/binfmt_elf.c: In function `load_elf_binary':
fs/binfmt_elf.c:750: warning: ignoring return value of `clear_user',
declared with attribute warn_unused_result
fs/binfmt_elf.c: In function `fill_psinfo':
fs/binfmt_elf.c:1216: warning: ignoring return value of
`copy_from_user', declared with attribute warn_unused_result
net/ipv6/ip6_flowlabel.c: In function `ipv6_flowlabel_opt':
net/ipv6/ip6_flowlabel.c:541: warning: ignoring return value of
`copy_to_user', declared with attribute warn_unused_result
net/ipv4/netfilter/ip_tables.c: In function `do_replace':
net/ipv4/netfilter/ip_tables.c:1133: warning: ignoring return value of
`copy_to_user', declared with attribute warn_unused_result
net/ipv4/netfilter/arp_tables.c: In function `do_replace':
net/ipv4/netfilter/arp_tables.c:952: warning: ignoring return value of
`copy_to_user', declared with attribute warn_unused_result
Con
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]
next prev parent reply other threads:[~2004-09-07 12:44 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 [this message]
2004-09-07 12:47 ` Arjan van de Ven
2004-09-07 12:53 ` Con Kolivas
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=413DAD07.3030306@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.