summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Monjalon <thomas.monjalon@6wind.com>2013-07-29 14:11:20 +0200
committerThomas Monjalon <thomas.monjalon@6wind.com>2013-09-16 15:05:16 +0200
commitb3ebd0038e20fbe2554b6a6de9d9150e9747c79c (patch)
tree728cc36e22cb872570f6d4759a859246d2f558dc
parent0558b814d2e44c57d5292c050dbc8b51fb450938 (diff)
downloaddpdk-b3ebd0038e20fbe2554b6a6de9d9150e9747c79c.zip
dpdk-b3ebd0038e20fbe2554b6a6de9d9150e9747c79c.tar.gz
dpdk-b3ebd0038e20fbe2554b6a6de9d9150e9747c79c.tar.xz
app: fix build with gcc 4.8
GCC 4.8 was producing this error: argument to ‘sizeof’ in ‘strncmp’ call is the same expression as the second source; did you mean to provide an explicit length? [-Werror=sizeof-pointer-memaccess] Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
-rw-r--r--app/test/test_cmdline_string.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/test/test_cmdline_string.c b/app/test/test_cmdline_string.c
index 7b358cf..4b7e066 100644
--- a/app/test/test_cmdline_string.c
+++ b/app/test/test_cmdline_string.c
@@ -382,8 +382,7 @@ test_parse_string_valid(void)
printf("Error: getting string element failed!\n");
return -1;
}
- if (strncmp(buf, string_elt_strs[i].result,
- sizeof(string_elt_strs[i].result)) != 0) {
+ if (strcmp(buf, string_elt_strs[i].result) != 0) {
printf("Error: result mismatch!\n");
return -1;
}