From mboxrd@z Thu Jan 1 00:00:00 1970
Return-Path:
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
by inbox.dpdk.org (Postfix) with ESMTP id C5BC246AA1;
Thu, 3 Jul 2025 19:03:17 +0200 (CEST)
Received: from mails.dpdk.org (localhost [127.0.0.1])
by mails.dpdk.org (Postfix) with ESMTP id 82C7540267;
Thu, 3 Jul 2025 19:03:17 +0200 (CEST)
Received: from inbox.dpdk.org (inbox.dpdk.org [95.142.172.178])
by mails.dpdk.org (Postfix) with ESMTP id 97A8E40264
for ; Thu, 3 Jul 2025 19:03:15 +0200 (CEST)
Received: by inbox.dpdk.org (Postfix, from userid 33)
id 857D246AE7; Thu, 3 Jul 2025 19:03:15 +0200 (CEST)
From: bugzilla@dpdk.org
To: dev@dpdk.org
Subject: [DPDK/core Bug 1742] trace: duplicate shadow of same variable
Date: Thu, 03 Jul 2025 17:03:15 +0000
X-Bugzilla-Reason: AssignedTo
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: DPDK
X-Bugzilla-Component: core
X-Bugzilla-Version: unspecified
X-Bugzilla-Keywords:
X-Bugzilla-Severity: minor
X-Bugzilla-Who: stephen@networkplumber.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: Normal
X-Bugzilla-Assigned-To: dev@dpdk.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform
op_sys bug_status bug_severity priority component assigned_to reporter
target_milestone
Message-ID:
Content-Type: multipart/alternative; boundary=17515621950.A38C0.1307483
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: https://bugs.dpdk.org/
Auto-Submitted: auto-generated
X-Auto-Response-Suppress: All
MIME-Version: 1.0
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: dev-bounces@dpdk.org
--17515621950.A38C0.1307483
Date: Thu, 3 Jul 2025 19:03:15 +0200
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: https://bugs.dpdk.org/
Auto-Submitted: auto-generated
X-Auto-Response-Suppress: All
https://bugs.dpdk.org/show_bug.cgi?id=3D1742
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 =E2=80=98trace_lcore_mem_=
dump=E2=80=99:
../lib/eal/common/eal_common_trace.c:273:23: warning: declaration of =E2=80=
=98trace=E2=80=99
shadows a global declaration [-Wshadow]
273 | struct trace *trace =3D trace_obj_get();
| ^~~~~
../lib/eal/common/eal_common_trace.c:27:21: note: shadowed declaration is h=
ere
27 | static struct trace trace =3D { .args =3D
STAILQ_HEAD_INITIALIZER(trace.args), };
| ^~~~~
../lib/eal/common/eal_common_trace.c: In function =E2=80=98rte_trace_dump=
=E2=80=99:
../lib/eal/common/eal_common_trace.c:298:34: warning: declaration of =E2=80=
=98tp_list=E2=80=99
shadows a global declaration [-Wshadow]
298 | struct trace_point_head *tp_list =3D trace_list_head_get();
| ^~~~~~~
../lib/eal/common/eal_common_trace.c:26:32: note: shadowed declaration is h=
ere
26 | static struct trace_point_head tp_list =3D
STAILQ_HEAD_INITIALIZER(tp_list);
| ^~~~~~~
../lib/eal/common/eal_common_trace.c:299:23: warning: declaration of =E2=80=
=98trace=E2=80=99
shadows a global declaration [-Wshadow]
299 | struct trace *trace =3D trace_obj_get();
| ^~~~~
../lib/eal/common/eal_common_trace.c:27:21: note: shadowed declaration is h=
ere
27 | static struct trace trace =3D { .args =3D
STAILQ_HEAD_INITIALIZER(trace.args), };
| ^~~~~
../lib/eal/common/eal_common_trace.c: In function
=E2=80=98__rte_trace_mem_per_thread_alloc=E2=80=99:
../lib/eal/common/eal_common_trace.c:334:23: warning: declaration of =E2=80=
=98trace=E2=80=99
shadows a global declaration [-Wshadow]
334 | struct trace *trace =3D trace_obj_get();
| ^~~~~
../lib/eal/common/eal_common_trace.c:27:21: note: shadowed declaration is h=
ere
27 | static struct trace trace =3D { .args =3D
STAILQ_HEAD_INITIALIZER(trace.args), };
| ^~~~~
../lib/eal/common/eal_common_trace.c: In function =E2=80=98trace_mem_per_th=
read_free=E2=80=99:
../lib/eal/common/eal_common_trace.c:411:23: warning: declaration of =E2=80=
=98trace=E2=80=99
shadows a global declaration [-Wshadow]
411 | struct trace *trace =3D trace_obj_get();
| ^~~~~
../lib/eal/common/eal_common_trace.c:27:21: note: shadowed declaration is h=
ere
27 | static struct trace trace =3D { .args =3D
STAILQ_HEAD_INITIALIZER(trace.args), };
| ^~~~~
../lib/eal/common/eal_common_trace.c: In function =E2=80=98trace_mem_free=
=E2=80=99:
../lib/eal/common/eal_common_trace.c:441:23: warning: declaration of =E2=80=
=98trace=E2=80=99
shadows a global declaration [-Wshadow]
441 | struct trace *trace =3D trace_obj_get();
| ^~~~~
../lib/eal/common/eal_common_trace.c:27:21: note: shadowed declaration is h=
ere
27 | static struct trace trace =3D { .args =3D
STAILQ_HEAD_INITIALIZER(trace.args), };
| ^~~~~
--=20
You are receiving this mail because:
You are the assignee for the bug.=
--17515621950.A38C0.1307483
Date: Thu, 3 Jul 2025 19:03:15 +0200
MIME-Version: 1.0
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: https://bugs.dpdk.org/
Auto-Submitted: auto-generated
X-Auto-Response-Suppress: All
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 |
---
|
You are receiving this mail because:
- You are the assignee for the bug.
=20=20=20=20=20=20=20=20=20=20
=
--17515621950.A38C0.1307483--