diff mbox

[ovs-dev,5/6] test-conntrack: Fix dead store reported by clang.

Message ID 1497898444-116702-5-git-send-email-bhanuprakash.bodireddy@intel.com
State Superseded
Headers show

Commit Message

Bodireddy, Bhanuprakash June 19, 2017, 6:54 p.m. UTC
Clang reports that value store to 'batch_size' is never read.

Signed-off-by: Bhanuprakash Bodireddy <bhanuprakash.bodireddy@intel.com>
---
 tests/test-conntrack.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Mark Kavanagh June 23, 2017, 9:49 a.m. UTC | #1
>From: ovs-dev-bounces@openvswitch.org [mailto:ovs-dev-bounces@openvswitch.org] On Behalf Of
>Bhanuprakash Bodireddy
>Sent: Monday, June 19, 2017 7:54 PM
>To: dev@openvswitch.org
>Subject: [ovs-dev] [PATCH 5/6] test-conntrack: Fix dead store reported by clang.
>
>Clang reports that value store to 'batch_size' is never read.
>
>Signed-off-by: Bhanuprakash Bodireddy <bhanuprakash.bodireddy@intel.com>

Hi Bhanu,

LGTM - I also compiled this with gcc, clang, and sparse without issue. Checkpatch reports no obvious problems either.

Acked-by: Mark Kavanagh <mark.b.kavanagh@intel.com>

Thanks,
Mark


>---
> tests/test-conntrack.c | 1 -
> 1 file changed, 1 deletion(-)
>
>diff --git a/tests/test-conntrack.c b/tests/test-conntrack.c
>index f79a9fc..5d2f8b8 100644
>--- a/tests/test-conntrack.c
>+++ b/tests/test-conntrack.c
>@@ -197,7 +197,6 @@ test_pcap(struct ovs_cmdl_context *ctx)
>         return;
>     }
>
>-    batch_size = 1;
>     if (ctx->argc > 2) {
>         batch_size = strtoul(ctx->argv[2], NULL, 0);
>         if (batch_size == 0 || batch_size > NETDEV_MAX_BURST) {
>--
>2.4.11
>
>_______________________________________________
>dev mailing list
>dev@openvswitch.org
>https://mail.openvswitch.org/mailman/listinfo/ovs-dev
diff mbox

Patch

diff --git a/tests/test-conntrack.c b/tests/test-conntrack.c
index f79a9fc..5d2f8b8 100644
--- a/tests/test-conntrack.c
+++ b/tests/test-conntrack.c
@@ -197,7 +197,6 @@  test_pcap(struct ovs_cmdl_context *ctx)
         return;
     }
 
-    batch_size = 1;
     if (ctx->argc > 2) {
         batch_size = strtoul(ctx->argv[2], NULL, 0);
         if (batch_size == 0 || batch_size > NETDEV_MAX_BURST) {