lkml.org 
[lkml]   [2004]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: attribute warn_unused_result
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
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 14:06    [W:0.062 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site