]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
tc_util: Silence spurious compiler warning
authorPhil Sutter <phil@nwl.cc>
Wed, 15 Nov 2017 14:01:31 +0000 (15:01 +0100)
committerStephen Hemminger <stephen@networkplumber.org>
Fri, 17 Nov 2017 00:01:48 +0000 (16:01 -0800)
GCC version 7.2.1 complains that 'result1' may be used uninitialized in
parse_action_control_slash_spaces(). This should not be possible in
practice, so the actual value 'result1' is initialized with does not
matter.

Signed-off-by: Phil Sutter <phil@nwl.cc>
tc/tc_util.c

index 9df74da3bfab066a36f19b2ecd46f8ca51253d58..197953ab449721bef835da34158883b61f02f743 100644 (file)
@@ -572,7 +572,7 @@ static int parse_action_control_slash_spaces(int *argc_p, char ***argv_p,
 {
        int argc = *argc_p;
        char **argv = *argv_p;
-       int result1, result2;
+       int result1 = -1, result2;
        int *result_p = &result1;
        int ok = 0;
        int ret;