DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] examples/ip_pipeline: fix build with clang 3.6
@ 2015-05-19 10:37 Thomas Monjalon
  2015-05-19 15:32 ` Dumitrescu, Cristian
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Monjalon @ 2015-05-19 10:37 UTC (permalink / raw)
  To: dev

This error is detected:
    examples/ip_pipeline/cmdline.c:272:15: error: address of array
          'params->file_path' will always evaluate to 'true'
            if (!params->file_path) {
                ~~~~~~~~~^~~~~~~~~

file_path is an array in a structure so it's unneeded to check it.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 examples/ip_pipeline/cmdline.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/examples/ip_pipeline/cmdline.c b/examples/ip_pipeline/cmdline.c
index 152acb5..3173fd0 100644
--- a/examples/ip_pipeline/cmdline.c
+++ b/examples/ip_pipeline/cmdline.c
@@ -268,12 +268,6 @@ cmd_run_file_parsed(
 	struct cmdline *file_cl;
 	int fd;
 
-	/* Check params */
-	if (!params->file_path) {
-		printf("Illegal value for file path (%s)\n", params->file_path);
-		return;
-	}
-
 	fd = open(params->file_path, O_RDONLY, 0);
 	if (fd < 0) {
 		printf("Illegal value for file path (%s)\n", params->file_path);
-- 
2.4.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-05-19 15:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-19 10:37 [dpdk-dev] [PATCH] examples/ip_pipeline: fix build with clang 3.6 Thomas Monjalon
2015-05-19 15:32 ` Dumitrescu, Cristian
2015-05-19 15:46   ` Thomas Monjalon

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).