<html>
<head>
<base href="https://bugs.dpdk.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8" class="bz_new_table">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - trace: duplicate shadow of same variable"
href="https://bugs.dpdk.org/show_bug.cgi?id=1742">1742</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>trace: duplicate shadow of same variable
</td>
</tr>
<tr>
<th>Product</th>
<td>DPDK
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>UNCONFIRMED
</td>
</tr>
<tr>
<th>Severity</th>
<td>minor
</td>
</tr>
<tr>
<th>Priority</th>
<td>Normal
</td>
</tr>
<tr>
<th>Component</th>
<td>core
</td>
</tr>
<tr>
<th>Assignee</th>
<td>dev@dpdk.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>stephen@networkplumber.org
</td>
</tr>
<tr>
<th>Target Milestone</th>
<td>---
</td>
</tr></table>
<p>
<div class="bz_comment_block">
<pre class="bz_comment_text">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), };
| ^~~~~
</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://bugs.dpdk.org/show_bug.cgi?id=1742">
<meta itemprop="name" content="View bug">
</div>
<meta itemprop="description" content="Bugzilla bug update notification">
</div>
</body>
</html>