DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 4/4] app: fix build with gcc 4.8
Date: Mon, 29 Jul 2013 14:44:55 +0200	[thread overview]
Message-ID: <6c57bdadc99eb8febc7344c7dfbbccde8aa42734.1375101416.git.thomas.monjalon@6wind.com> (raw)
In-Reply-To: <cover.1375101416.git.thomas.monjalon@6wind.com>
In-Reply-To: <cover.1375101416.git.thomas.monjalon@6wind.com>

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>
---
 app/test/test_cmdline_string.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test/test_cmdline_string.c b/app/test/test_cmdline_string.c
index 7b358cf..84a82ce 100644
--- a/app/test/test_cmdline_string.c
+++ b/app/test/test_cmdline_string.c
@@ -383,7 +383,7 @@ test_parse_string_valid(void)
 			return -1;
 		}
 		if (strncmp(buf, string_elt_strs[i].result,
-				sizeof(string_elt_strs[i].result)) != 0) {
+				sizeof(buf)) != 0) {
 			printf("Error: result mismatch!\n");
 			return -1;
 		}
-- 
1.7.10.4

  parent reply	other threads:[~2013-07-29 12:44 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-29 12:44 [dpdk-dev] [PATCH 0/4] build fixes for recent distros Thomas Monjalon
2013-07-29 12:44 ` [dpdk-dev] [PATCH 1/4] kni: fix build with kernel 3.8 Thomas Monjalon
2013-09-12 15:30   ` Nicolas Dichtel
2013-07-29 12:44 ` [dpdk-dev] [PATCH 2/4] kni: fix build with kernel 3.9 Thomas Monjalon
2013-09-12 15:34   ` Nicolas Dichtel
2013-09-16 13:09     ` Thomas Monjalon
2013-07-29 12:44 ` [dpdk-dev] [PATCH 3/4] kni: fix build with kernel 3.10 Thomas Monjalon
2013-09-12 16:09   ` Nicolas Dichtel
2013-09-16 13:09     ` Thomas Monjalon
2013-07-29 12:44 ` Thomas Monjalon [this message]
2013-09-12 15:59   ` [dpdk-dev] [PATCH 4/4] app: fix build with gcc 4.8 Nicolas Dichtel
2013-09-13 14:14 ` [dpdk-dev] [PATCH v2 0/4] build fixes for recent distros Thomas Monjalon
2013-09-13 14:14   ` [dpdk-dev] [PATCH v2 1/4] kni: fix build with kernel 3.8 Thomas Monjalon
2013-09-16 11:21     ` Nicolas Dichtel
2013-09-13 14:14   ` [dpdk-dev] [PATCH v2 2/4] kni: fix build with kernel 3.9 Thomas Monjalon
2013-09-13 14:14   ` [dpdk-dev] [PATCH v2 3/4] kni: fix build with kernel 3.10 Thomas Monjalon
2013-09-13 14:14   ` [dpdk-dev] [PATCH v2 4/4] app: fix build with gcc 4.8 Thomas Monjalon
2013-09-16 11:22     ` Nicolas Dichtel
2013-09-16 13:10       ` 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=6c57bdadc99eb8febc7344c7dfbbccde8aa42734.1375101416.git.thomas.monjalon@6wind.com \
    --to=thomas.monjalon@6wind.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).