naccyde / rpms / iproute

Forked from rpms/iproute 8 months ago
Clone

Blame SOURCES/0035-ip-link-remove-warning-message.patch

049c96
From 9319358ca9b9c3a324ea00a061786632ea127278 Mon Sep 17 00:00:00 2001
049c96
From: Phil Sutter <psutter@redhat.com>
049c96
Date: Thu, 18 Feb 2016 14:34:13 +0100
049c96
Subject: [PATCH] ip-link: remove warning message
049c96
049c96
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1291832
049c96
Upstream Status: iproute2.git commit eb85526923d1d
049c96
049c96
This fixes a warning generated by the previous backport.
049c96
049c96
commit eb85526923d1de1857c2b1e6860a471f2a0ae1b9
049c96
Author: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
049c96
Date:   Thu Jan 21 02:23:49 2016 +0000
049c96
049c96
    ip-link: remove warning message
049c96
049c96
    the warning was:
049c96
    iproute.c:301:12: warning: 'val' may be used uninitialized in this
049c96
    function [-Wmaybe-uninitialized]
049c96
       features &= ~RTAX_FEATURE_ECN;
049c96
                ^
049c96
    iproute.c:575:10: note: 'val' was declared here
049c96
       __u32 val;
049c96
    	  ^
049c96
049c96
    Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
049c96
---
049c96
 ip/iproute.c | 2 +-
049c96
 1 file changed, 1 insertion(+), 1 deletion(-)
049c96
049c96
diff --git a/ip/iproute.c b/ip/iproute.c
049c96
index d3a5e1c..99d93c8 100644
049c96
--- a/ip/iproute.c
049c96
+++ b/ip/iproute.c
049c96
@@ -539,7 +539,7 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
049c96
 			mxlock = *(unsigned*)RTA_DATA(mxrta[RTAX_LOCK]);
049c96
 
049c96
 		for (i=2; i<= RTAX_MAX; i++) {
049c96
-			__u32 val;
049c96
+			__u32 val = 0U;
049c96
 
049c96
 			if (mxrta[i] == NULL)
049c96
 				continue;
049c96
-- 
049c96
1.8.3.1
049c96