naccyde / rpms / iproute

Forked from rpms/iproute 9 months ago
Clone
Blob Blame History Raw
From 9319358ca9b9c3a324ea00a061786632ea127278 Mon Sep 17 00:00:00 2001
From: Phil Sutter <psutter@redhat.com>
Date: Thu, 18 Feb 2016 14:34:13 +0100
Subject: [PATCH] ip-link: remove warning message

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1291832
Upstream Status: iproute2.git commit eb85526923d1d

This fixes a warning generated by the previous backport.

commit eb85526923d1de1857c2b1e6860a471f2a0ae1b9
Author: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Date:   Thu Jan 21 02:23:49 2016 +0000

    ip-link: remove warning message

    the warning was:
    iproute.c:301:12: warning: 'val' may be used uninitialized in this
    function [-Wmaybe-uninitialized]
       features &= ~RTAX_FEATURE_ECN;
                ^
    iproute.c:575:10: note: 'val' was declared here
       __u32 val;
    	  ^

    Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
---
 ip/iproute.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ip/iproute.c b/ip/iproute.c
index d3a5e1c..99d93c8 100644
--- a/ip/iproute.c
+++ b/ip/iproute.c
@@ -539,7 +539,7 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
 			mxlock = *(unsigned*)RTA_DATA(mxrta[RTAX_LOCK]);
 
 		for (i=2; i<= RTAX_MAX; i++) {
-			__u32 val;
+			__u32 val = 0U;
 
 			if (mxrta[i] == NULL)
 				continue;
-- 
1.8.3.1