When Link Time Optimization is enabled, compiler may complain about "id" in eth_representor_cmp() being uninitialized.
To suppress the warning it is enough to add explicit initialization of the variable causing the issue. Signed-off-by: Krzysztof Karas <krzysztof.ka...@intel.com> --- .mailmap | 1 + lib/ethdev/rte_class_eth.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.mailmap b/.mailmap index 5015494210..ba34945bc5 100644 --- a/.mailmap +++ b/.mailmap @@ -1573,3 +1573,4 @@ Ziye Yang <ziye.y...@intel.com> Zoltan Kiss <zoltan.k...@schaman.hu> <zoltan.k...@linaro.org> Zorik Machulsky <zo...@amazon.com> Zyta Szpak <z...@marvell.com> <z...@semihalf.com> <zyta.sz...@semihalf.com> +Krzysztof Karas <krzysztof.ka...@intel.com> diff --git a/lib/ethdev/rte_class_eth.c b/lib/ethdev/rte_class_eth.c index 838b3a8f9f..b61dae849d 100644 --- a/lib/ethdev/rte_class_eth.c +++ b/lib/ethdev/rte_class_eth.c @@ -67,7 +67,7 @@ eth_representor_cmp(const char *key __rte_unused, const struct rte_eth_dev *edev = opaque; const struct rte_eth_dev_data *data = edev->data; struct rte_eth_devargs eth_da; - uint16_t id, nc, np, nf, i, c, p, f; + uint16_t id = 0, nc, np, nf, i, c, p, f; if ((data->dev_flags & RTE_ETH_DEV_REPRESENTOR) == 0) return -1; /* not a representor port */ -- 2.34.1 --------------------------------------------------------------------- Intel Technology Poland sp. z o.o. ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN. Spolka oswiadcza, ze posiada status duzego przedsiebiorcy w rozumieniu ustawy z dnia 8 marca 2013 r. o przeciwdzialaniu nadmiernym opoznieniom w transakcjach handlowych. Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek przegladanie lub rozpowszechnianie jest zabronione. This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.