From: Jakub Kicinski <kuba@kernel.org> To: Stefan Assmann <sassmann@kpanic.de> Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, davem@davemloft.net, jeffrey.t.kirsher@intel.com, lihong.yang@intel.com Subject: Re: [PATCH] i40e: fix uninitialized variable in i40e_set_vsi_promisc Date: Wed, 12 Aug 2020 10:46:28 -0700 [thread overview] Message-ID: <20200812104628.340a073a@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> (raw) In-Reply-To: <20200812143950.11675-1-sassmann@kpanic.de> On Wed, 12 Aug 2020 16:39:50 +0200 Stefan Assmann wrote: > drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c: In function ‘i40e_set_vsi_promisc’: > drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c:1176:14: error: ‘aq_ret’ may be used uninitialized in this function [-Werror=maybe-uninitialized] > i40e_status aq_ret; What's your compiler? I don't see it on GCC 10.1. > In case the code inside the if statement and the for loop does not get > executed aq_ret will be uninitialized when the variable gets returned at > the end of the function. I think it'd be a better fix to make num_vlans unsigned.
WARNING: multiple messages have this Message-ID (diff)
From: Jakub Kicinski <kuba@kernel.org> To: intel-wired-lan@osuosl.org Subject: [Intel-wired-lan] [PATCH] i40e: fix uninitialized variable in i40e_set_vsi_promisc Date: Wed, 12 Aug 2020 10:46:28 -0700 [thread overview] Message-ID: <20200812104628.340a073a@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> (raw) In-Reply-To: <20200812143950.11675-1-sassmann@kpanic.de> On Wed, 12 Aug 2020 16:39:50 +0200 Stefan Assmann wrote: > drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c: In function ?i40e_set_vsi_promisc?: > drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c:1176:14: error: ?aq_ret? may be used uninitialized in this function [-Werror=maybe-uninitialized] > i40e_status aq_ret; What's your compiler? I don't see it on GCC 10.1. > In case the code inside the if statement and the for loop does not get > executed aq_ret will be uninitialized when the variable gets returned at > the end of the function. I think it'd be a better fix to make num_vlans unsigned.
next prev parent reply other threads:[~2020-08-12 17:46 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-08-12 14:39 [PATCH] i40e: fix uninitialized variable in i40e_set_vsi_promisc Stefan Assmann 2020-08-12 14:39 ` [Intel-wired-lan] " Stefan Assmann 2020-08-12 17:46 ` Jakub Kicinski [this message] 2020-08-12 17:46 ` Jakub Kicinski 2020-08-13 5:28 ` Stefan Assmann 2020-08-13 5:28 ` [Intel-wired-lan] " Stefan Assmann
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200812104628.340a073a@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com \ --to=kuba@kernel.org \ --cc=davem@davemloft.net \ --cc=intel-wired-lan@lists.osuosl.org \ --cc=jeffrey.t.kirsher@intel.com \ --cc=lihong.yang@intel.com \ --cc=netdev@vger.kernel.org \ --cc=sassmann@kpanic.de \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.