netdev
[Top] [All Lists]

Re: [NET] 2.6.x build warning

To: davem@xxxxxxxxxxxxx, jgarzik@xxxxxxxxx
Subject: Re: [NET] 2.6.x build warning
From: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@xxxxxxxxxxxxxx>
Date: Fri, 27 May 2005 09:54:26 +0900 (JST)
Cc: netdev@xxxxxxxxxxx, yoshfuji@xxxxxxxxxxxxxx
In-reply-to: <42961EDB.7000407@xxxxxxxxx>
Organization: USAGI Project
References: <42961EDB.7000407@xxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
In article <42961EDB.7000407@xxxxxxxxx> (at Thu, 26 May 2005 15:09:15 -0400), 
Jeff Garzik <jgarzik@xxxxxxxxx> 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 <yoshfuji@xxxxxxxxxxxxxx>

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@xxxxxxxxxxxxxx>
GPG-FP  : 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA

<Prev in Thread] Current Thread [Next in Thread>