From 535e850aedd8060ebc7c2c6c779d624a81b3548c Mon Sep 17 00:00:00 2001 From: Keith Wiles Date: Tue, 15 Aug 2017 08:53:05 -0500 Subject: [PATCH] app/procinfo: fix compilation with -O3 When using EXTRA_CFLAGS="-g -O3" in the build the -O3 causes compiler warnings. Using Ubuntu 17.04 gcc compiler. Signed-off-by: Keith Wiles Acked-by: Anatoly Burakov --- app/proc_info/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/proc_info/main.c b/app/proc_info/main.c index 8b753a2ee0..12566e27d9 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]); -- 2.20.1