* [DPDK/core Bug 1742] trace: duplicate shadow of same variable
@ 2025-07-03 17:03 bugzilla
0 siblings, 0 replies; only message in thread
From: bugzilla @ 2025-07-03 17:03 UTC (permalink / raw)
To: dev
[-- Attachment #1: Type: text/plain, Size: 3715 bytes --]
https://bugs.dpdk.org/show_bug.cgi?id=1742
Bug ID: 1742
Summary: trace: duplicate shadow of same variable
Product: DPDK
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: minor
Priority: Normal
Component: core
Assignee: dev@dpdk.org
Reporter: stephen@networkplumber.org
Target Milestone: ---
The variable name 'trace' is used in different places and will get flagged as
warning with -Wshadow. Confusing and error prone
[48/3418] Compiling C object lib/librte_eal.a.p/eal_common_eal_common_trace.c.o
../lib/eal/common/eal_common_trace.c: In function ‘trace_lcore_mem_dump’:
../lib/eal/common/eal_common_trace.c:273:23: warning: declaration of ‘trace’
shadows a global declaration [-Wshadow]
273 | struct trace *trace = trace_obj_get();
| ^~~~~
../lib/eal/common/eal_common_trace.c:27:21: note: shadowed declaration is here
27 | static struct trace trace = { .args =
STAILQ_HEAD_INITIALIZER(trace.args), };
| ^~~~~
../lib/eal/common/eal_common_trace.c: In function ‘rte_trace_dump’:
../lib/eal/common/eal_common_trace.c:298:34: warning: declaration of ‘tp_list’
shadows a global declaration [-Wshadow]
298 | struct trace_point_head *tp_list = trace_list_head_get();
| ^~~~~~~
../lib/eal/common/eal_common_trace.c:26:32: note: shadowed declaration is here
26 | static struct trace_point_head tp_list =
STAILQ_HEAD_INITIALIZER(tp_list);
| ^~~~~~~
../lib/eal/common/eal_common_trace.c:299:23: warning: declaration of ‘trace’
shadows a global declaration [-Wshadow]
299 | struct trace *trace = trace_obj_get();
| ^~~~~
../lib/eal/common/eal_common_trace.c:27:21: note: shadowed declaration is here
27 | static struct trace trace = { .args =
STAILQ_HEAD_INITIALIZER(trace.args), };
| ^~~~~
../lib/eal/common/eal_common_trace.c: In function
‘__rte_trace_mem_per_thread_alloc’:
../lib/eal/common/eal_common_trace.c:334:23: warning: declaration of ‘trace’
shadows a global declaration [-Wshadow]
334 | struct trace *trace = trace_obj_get();
| ^~~~~
../lib/eal/common/eal_common_trace.c:27:21: note: shadowed declaration is here
27 | static struct trace trace = { .args =
STAILQ_HEAD_INITIALIZER(trace.args), };
| ^~~~~
../lib/eal/common/eal_common_trace.c: In function ‘trace_mem_per_thread_free’:
../lib/eal/common/eal_common_trace.c:411:23: warning: declaration of ‘trace’
shadows a global declaration [-Wshadow]
411 | struct trace *trace = trace_obj_get();
| ^~~~~
../lib/eal/common/eal_common_trace.c:27:21: note: shadowed declaration is here
27 | static struct trace trace = { .args =
STAILQ_HEAD_INITIALIZER(trace.args), };
| ^~~~~
../lib/eal/common/eal_common_trace.c: In function ‘trace_mem_free’:
../lib/eal/common/eal_common_trace.c:441:23: warning: declaration of ‘trace’
shadows a global declaration [-Wshadow]
441 | struct trace *trace = trace_obj_get();
| ^~~~~
../lib/eal/common/eal_common_trace.c:27:21: note: shadowed declaration is here
27 | static struct trace trace = { .args =
STAILQ_HEAD_INITIALIZER(trace.args), };
| ^~~~~
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #2: Type: text/html, Size: 5583 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-07-03 17:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-03 17:03 [DPDK/core Bug 1742] trace: duplicate shadow of same variable bugzilla
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).