DPDK patches and discussions
 help / color / mirror / Atom feed
From: Keith Wiles <keith.wiles@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] app: fix gcc -O3 compiler errors
Date: Tue, 15 Aug 2017 08:53:05 -0500	[thread overview]
Message-ID: <20170815135305.70024-1-keith.wiles@intel.com> (raw)

When using EXTRA_CFLAGS="-g -O3" in the build the -O3 causes
compiler warnings for these two applications. Using Ubuntu 17.04
gcc compiler.

Signed-off-by: Keith Wiles <keith.wiles@intel.com>
---
 app/proc_info/main.c                     | 4 +++-
 app/test-crypto-perf/cperf_test_verify.c | 2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/app/proc_info/main.c b/app/proc_info/main.c
index 8b753a2ee..12566e27d 100644
--- a/app/proc_info/main.c
+++ b/app/proc_info/main.c
@@ -524,7 +524,9 @@ nic_xstats_display(uint8_t port_id)
 			sprintf(buf, "PUTVAL %s/dpdkstat-port.%u/%s-%s N:%"
 				PRIu64"\n", host_id, port_id, counter_type,
 				xstats_names[i].name, values[i]);
-			write(stdout_fd, buf, strlen(buf));
+			ret = write(stdout_fd, buf, strlen(buf));
+			if (ret < 0)
+				goto err;
 		} else {
 			printf("%s: %"PRIu64"\n", xstats_names[i].name,
 					values[i]);
diff --git a/app/test-crypto-perf/cperf_test_verify.c b/app/test-crypto-perf/cperf_test_verify.c
index a314646c2..4548e7241 100644
--- a/app/test-crypto-perf/cperf_test_verify.c
+++ b/app/test-crypto-perf/cperf_test_verify.c
@@ -366,6 +366,8 @@ cperf_verify_op(struct rte_crypto_op *op,
 		auth = 1;
 		auth_offset = vector->aad.length + options->test_buffer_size;
 		break;
+	default:
+		return 1;
 	}
 
 	if (cipher == 1) {
-- 
2.11.0

             reply	other threads:[~2017-08-15 13:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-15 13:53 Keith Wiles [this message]
2017-10-04 12:59 ` Burakov, Anatoly
2017-10-06 22:00   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170815135305.70024-1-keith.wiles@intel.com \
    --to=keith.wiles@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).