Re: [NET] 2.6.x build warning
From: YOSHIFUJI Hideaki / 吉藤英明 <hidden>
Date: 2005-05-27 00:54:26
In article [ref] (at Thu, 26 May 2005 15:09:15 -0400), Jeff Garzik [off-list ref] says:
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
As before, it is intentional. Okay, let's just waste the result for avoiding the warning. Signed-off-by: YOSHIFUJI Hideaki <redacted> Index: net/ipv6/ip6_flowlabel.c ===================================================================
--- 30b3bda5e47d088b46ab8eab4d69d059a71197e1/net/ipv6/ip6_flowlabel.c (mode:100644)
+++ uncommitted/net/ipv6/ip6_flowlabel.c (mode:100644)@@ -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;
--
YOSHIFUJI Hideaki @ USAGI Project <yoshfuji@linux-ipv6.org>
GPG-FP : 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA