Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp8457719ybi; Thu, 6 Jun 2019 12:39:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqz8IUZK3l6RPGrTv8Z+lAJ7AylychP64cudq22vJ01UOzi89IVq1JLN4O4Y9q8wbHLIf4zW X-Received: by 2002:a63:3141:: with SMTP id x62mr193462pgx.282.1559849984789; Thu, 06 Jun 2019 12:39:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559849984; cv=none; d=google.com; s=arc-20160816; b=qpqBEtneTmzWnlGLnRNT04dpwIooixOcXJASNQc1J2hTwH+J9AQ9zysauyWOkRrC50 fi0A9nh8xgVibPoWEPEbAzjqz95D+5gl9j7Bsj9c6oKAd397v/ivtJzc8jnhShifvFAz KNP+xj09OznI5btuL99VBNXEzfFtnW25MN+frdUNl6K/gofMAukkBji8k/2wsYY4bTG5 cB4ATqVyTJy21h6jQ6YoF3/ZKJ3qjzJeqFnhqUOQaTk+zekZMGwX4ry+wUu0RLawowNV C8OK6G6A+4M82NBwS0/pDXo2KkE1nJi0y0OgH/GtUFdBRGdLqnz6b3rqjMOm+lqsIgUp 1Lwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=NfifDdL+NpCO8qPZ1Q4+MMf9WNKJ6AKEbZR6EHDrCsM=; b=qfNRVOdnVXBWIWzEiC6kqxLOpqapmtCTauHcKU7ZfZrvAXot9AC+3PY126d2CYiN0w B5XOLrVr2UkjwnY8ZS1pwJuTTkJcwn3YtZARkvo6EMCECctw/5/do5Rr5mLn7SpbVXh9 5euDujfUDmbDZhK41i1VBxImlbom6qLOy7ZeaavwNYt7Ry1ygo45NEHR5gY5qT9jfVB1 L5t3RWTcoiPNU0IT3ZZKtZtUdqoa6S3fjMo+aJZs7qFxn+NEfqQuAo5ce0z3RLJxZArj 3o26B4JbN3ivGTrw0BYzzf45hvXV9i8afaww8aE5I0joieqmN9X9sQopS69RzNh/S6Yc zmkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=olv0nqRU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m7si2355090pls.392.2019.06.06.12.39.28; Thu, 06 Jun 2019 12:39:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=olv0nqRU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729509AbfFFPri (ORCPT + 99 others); Thu, 6 Jun 2019 11:47:38 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:45882 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729185AbfFFPrh (ORCPT ); Thu, 6 Jun 2019 11:47:37 -0400 Received: by mail-pf1-f196.google.com with SMTP id s11so1736039pfm.12; Thu, 06 Jun 2019 08:47:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=NfifDdL+NpCO8qPZ1Q4+MMf9WNKJ6AKEbZR6EHDrCsM=; b=olv0nqRUK9PV5cAJt8TjQa/fI6j8FDIWsOM0MUzfdeBXhSfGVgEIVByYGCkLjwtgk+ +pGDQd+d39un0hq1WxQ46aDqE2upjHH+eJEpqGggIehYndps9BvDkdqGdtNigdZPMNnp xy9fTUnFVz+i8paHHEfSALaMX8art72kUgkd6E0Lt6SuWDooCZRmXoYvh40lz7OglTh+ WVNvGLXYg4I7RuosFCBH9wT0VIqjyyit8rLYFyOuvcijM7TFR9deJRS8CQOGzhOambs0 eQlqiMQmPaBTuNwyb25OuoUXBq3ao4zpNxl1A8c0srkJteNezNg4il06U0xTNTXvFbkj Pvsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=NfifDdL+NpCO8qPZ1Q4+MMf9WNKJ6AKEbZR6EHDrCsM=; b=FS0CRnbsvoI9Jbj9XHHgvytA7rXDE3eMpCfP9jByePxJW2VcMkGSH7kcJVxnH4UbrF H6SZAbPCNSnsrSimvTBJgWZmBcoKTewg0bc7UmcqolzszKgPBuVAehX3fv1j+E5rE+hM +kqUudb352m5F+pZyJ8EPgbdEyza5wEDoKNmObFePolLh3WRGmoA0s8KmVSIF0OrfPBC LV7AZrk+NoM5cKsYv7mVmmv9kvEroQy2PHrYjXuoheTL4kCpYiayCGtbiO2FGignEzC4 cgFkooow1OpP0Y0slkEwUB3OIf+0/Whnqlm60vSn60bBi4POPnMmo1BKFrRu8gnLVy8D p/uA== X-Gm-Message-State: APjAAAUElNFT5hEBG0axbk2zF9gmudOT7E+qpRwUWIWzk51VXYd6jI9p YtPzS4/UXI0SQwRiEbAB/m3/f++BZYc= X-Received: by 2002:a62:fb0a:: with SMTP id x10mr31141215pfm.224.1559836057029; Thu, 06 Jun 2019 08:47:37 -0700 (PDT) Received: from [172.27.227.242] ([216.129.126.118]) by smtp.googlemail.com with ESMTPSA id u16sm2262264pje.6.2019.06.06.08.47.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Jun 2019 08:47:36 -0700 (PDT) Subject: Re: [PATCH] net: ipv4: fib_semantics: fix uninitialized variable To: "Enrico Weigelt, metux IT consult" , linux-kernel@vger.kernel.org Cc: davem@davemloft.net, kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, netdev@vger.kernel.org References: <1559832197-22758-1-git-send-email-info@metux.net> From: David Ahern Message-ID: <0ba84175-49be-9023-271d-516c93e2d83e@gmail.com> Date: Thu, 6 Jun 2019 09:47:34 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1559832197-22758-1-git-send-email-info@metux.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/6/19 8:43 AM, Enrico Weigelt, metux IT consult wrote: > From: Enrico Weigelt > > fix an uninitialized variable: > > CC net/ipv4/fib_semantics.o > net/ipv4/fib_semantics.c: In function 'fib_check_nh_v4_gw': > net/ipv4/fib_semantics.c:1027:12: warning: 'err' may be used uninitialized in this function [-Wmaybe-uninitialized] > if (!tbl || err) { > ^~ > > Signed-off-by: Enrico Weigelt > --- > net/ipv4/fib_semantics.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c > index b804106..bfa49a8 100644 > --- a/net/ipv4/fib_semantics.c > +++ b/net/ipv4/fib_semantics.c > @@ -964,7 +964,7 @@ static int fib_check_nh_v4_gw(struct net *net, struct fib_nh *nh, u32 table, > { > struct net_device *dev; > struct fib_result res; > - int err; > + int err = 0; > > if (nh->fib_nh_flags & RTNH_F_ONLINK) { > unsigned int addr_type; > what compiler version? if tbl is set, then err is set.