From d2ebbbc880d6ad020d900a813f9d9b0c7a2d3a0d Mon Sep 17 00:00:00 2001 From: Erik Boasson Date: Thu, 25 Apr 2019 11:43:19 +0200 Subject: [PATCH] address a handful of compiler warnings in ddsperf These are fortunately all false positives. Signed-off-by: Erik Boasson --- src/tools/ddsperf/ddsperf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tools/ddsperf/ddsperf.c b/src/tools/ddsperf/ddsperf.c index 51874a4..7052233 100644 --- a/src/tools/ddsperf/ddsperf.c +++ b/src/tools/ddsperf/ddsperf.c @@ -664,7 +664,7 @@ static dds_instance_handle_t get_pphandle_for_pubhandle (dds_instance_handle_t p dds_sample_info_t info; if ((n = dds_read_instance (rd_publications, &msg, &info, 1, 1, pubhandle)) < 0) error2 ("dds_read_instance(rd_publications, %"PRIx64") failed: %d\n", pubhandle, (int) n); - else if (n == 0 || !info.valid_data) + if (n == 0 || !info.valid_data) { printf ("get_pong_writer: publication handle %"PRIx64" not found\n", pubhandle); fflush (stdout); @@ -772,7 +772,7 @@ static bool process_data (dds_entity_t rd, struct subthread_arg *arg) { if (iseq[i].valid_data) { - uint32_t seq, keyval, size; + uint32_t seq = 0, keyval = 0, size = 0; switch (topicsel) { case KS: { KeyedSeq *d = (KeyedSeq *) mseq[i]; keyval = d->keyval; seq = d->seq; size = 12 + d->baggage._length; } break; @@ -783,7 +783,7 @@ static bool process_data (dds_entity_t rd, struct subthread_arg *arg) (void) check_eseq (&eseq_admin, seq, keyval, size, iseq[i].publication_handle); if (iseq[i].source_timestamp & 1) { - dds_entity_t wr_pong = 0; + dds_entity_t wr_pong; if ((wr_pong = get_pong_writer (iseq[i].publication_handle)) != 0) { dds_return_t rc;