naccyde / rpms / iproute

Forked from rpms/iproute 7 months ago
Clone

Blame SOURCES/0141-tc_util-Silence-spurious-compiler-warning.patch

36cfb7
From 774b1c35d4515434e979d9090960ad3293bfe12e Mon Sep 17 00:00:00 2001
36cfb7
From: Andrea Claudi <aclaudi@redhat.com>
36cfb7
Date: Wed, 5 Jun 2019 13:18:27 +0200
36cfb7
Subject: [PATCH] tc_util: Silence spurious compiler warning
36cfb7
36cfb7
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1714660
36cfb7
Upstream Status: iproute2.git commit 66942e522e54d
36cfb7
36cfb7
commit 66942e522e54d9f96153590b7c1c7830b8f73f5c
36cfb7
Author: Phil Sutter <phil@nwl.cc>
36cfb7
Date:   Wed Nov 15 15:01:31 2017 +0100
36cfb7
36cfb7
    tc_util: Silence spurious compiler warning
36cfb7
36cfb7
    GCC version 7.2.1 complains that 'result1' may be used uninitialized in
36cfb7
    parse_action_control_slash_spaces(). This should not be possible in
36cfb7
    practice, so the actual value 'result1' is initialized with does not
36cfb7
    matter.
36cfb7
36cfb7
    Signed-off-by: Phil Sutter <phil@nwl.cc>
36cfb7
---
36cfb7
 tc/tc_util.c | 2 +-
36cfb7
 1 file changed, 1 insertion(+), 1 deletion(-)
36cfb7
36cfb7
diff --git a/tc/tc_util.c b/tc/tc_util.c
36cfb7
index 65695ea592ed8..e115e5a70e3a1 100644
36cfb7
--- a/tc/tc_util.c
36cfb7
+++ b/tc/tc_util.c
36cfb7
@@ -556,7 +556,7 @@ static int parse_action_control_slash_spaces(int *argc_p, char ***argv_p,
36cfb7
 {
36cfb7
 	int argc = *argc_p;
36cfb7
 	char **argv = *argv_p;
36cfb7
-	int result1, result2;
36cfb7
+	int result1 = -1, result2;
36cfb7
 	int *result_p = &result1;
36cfb7
 	int ok = 0;
36cfb7
 	int ret;
36cfb7
-- 
e138d9
2.21.0
36cfb7