2.6.x build warning
Subsystems (4)
from current git tree:
net/ipv6/ip6_flowlabel.c: In function `ipv6_flowlabel_opt':net/ipv6/ip6_flowlabel.c:540: warning: ignoring return value of `copy_to_user', declared with attribute warn_unused_result
David S. Miller
maintainerFrom: Jeff Garzik <[email protected]>
Date: Thu, 26 May 2005 15:09:15 -0400
Quoted 5 lines
from current git tree:
net/ipv6/ip6_flowlabel.c: In function `ipv6_flowlabel_opt':net/ipv6/ip6_flowlabel.c:540: warning: ignoring return value of `copy_to_user', declared with attributewarn_unused_result
I've fixed this warning in my tree, thanks Jeff.
In article <[email protected]> (at Thu, 26 May 2005 15:09:15 -0400), Jeff Garzik <[email protected]> says:
Quoted 5 lines
from current git tree:
net/ipv6/ip6_flowlabel.c: In function `ipv6_flowlabel_opt':net/ipv6/ip6_flowlabel.c:540: warning: ignoring return value of `copy_to_user', declared with attributewarn_unused_result
As before, it is intentional.
Okay, let's just waste the result for avoiding the warning.
net/ipv6/ip6_flowlabel.c (mode:100644) +5 -4
@@ -535,10 +535,11 @@ if (err) goto done; - /* Do not check for fault */ - if (!freq.flr_label) - copy_to_user(&((struct in6_flowlabel_req __user *) optval)->flr_label, - &fl->label, sizeof(fl->label)); + if (!freq.flr_label) { + /* Do not check for fault */ + int dummy = copy_to_user(&((struct in6_flowlabel_req __user *) optval)->flr_label, + &fl->label, sizeof(fl->label)); + } sfl1->fl = fl; sfl1->next = np->ipv6_fl_list;
Signature · 2 lines
YOSHIFUJI Hideaki @ USAGI Project <[email protected]> GPG-FP : 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA