From: Thomas Monjalon <thomas@monjalon.net>
To: dev@dpdk.org, Matan Azrad <matan@mellanox.com>
Subject: Re: [dpdk-dev] [PATCH] ethdev: fix build with gcc 5.4.0
Date: Thu, 13 Jul 2017 11:35:58 +0200 [thread overview]
Message-ID: <2333451.97DFAzsifD@xps> (raw)
In-Reply-To: <20170706214532.31274-1-thomas@monjalon.net>
06/07/2017 23:45, Thomas Monjalon:
> Seen on Ubuntu 16.04 with GCC 5.4.0:
>
> lib/librte_ether/rte_ethdev.c: In function 'get_mac_addr_index':
> lib/librte_ether/rte_ethdev.c:2369:26: error:
> 'dev_info.max_mac_addrs' may be used uninitialized in this function
>
> Indeed, rte_eth_dev_info_get() do not write into dev_info
> if the port_id is not valid.
> So we need to check the port_id and return in case of error.
>
> This extra check should not be needed because the port_id is always
> checked before calling get_mac_addr_index().
> However it does not hurt.
>
> Reported-by: Matan Azrad <matan@mellanox.com>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> Tested-by: Matan Azrad <matan@mellanox.com>
Applied
prev parent reply other threads:[~2017-07-13 9:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-06 21:45 Thomas Monjalon
2017-07-13 9:35 ` Thomas Monjalon [this message]
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=2333451.97DFAzsifD@xps \
--to=thomas@monjalon.net \
--cc=dev@dpdk.org \
--cc=matan@mellanox.com \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).