From: Phil Sutter Subject: [iproute PATCH 2/2] tc_util: Silence spurious compiler warning Date: Wed, 15 Nov 2017 15:01:31 +0100 Message-ID: <20171115140131.15397-3-phil@nwl.cc> References: <20171115140131.15397-1-phil@nwl.cc> Cc: netdev@vger.kernel.org To: Stephen Hemminger Return-path: Received: from orbyte.nwl.cc ([151.80.46.58]:57598 "EHLO orbyte.nwl.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757991AbdKOOBr (ORCPT ); Wed, 15 Nov 2017 09:01:47 -0500 In-Reply-To: <20171115140131.15397-1-phil@nwl.cc> Sender: netdev-owner@vger.kernel.org List-ID: 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 --- tc/tc_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tc/tc_util.c b/tc/tc_util.c index b01362533cd56..55cdec5dfbe0a 100644 --- a/tc/tc_util.c +++ b/tc/tc_util.c @@ -573,7 +573,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; -- 2.13.1