DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dan Gora <dg@adax.com>
To: dev@dpdk.org
Cc: Dan Gora <dg@adax.com>, anatoly.burakov@intel.com
Subject: [dpdk-dev] [PATCH] test: fix compilation error in external memory test
Date: Tue, 16 Oct 2018 21:22:44 -0300	[thread overview]
Message-ID: <20181017002244.6117-1-dg@adax.com> (raw)

Fix a compilation error in test_external_mem.c:

  CC test_external_mem.o
test_external_mem.c: In function ‘test_external_mem’:
test_external_mem.c:375:2: error: ‘for’ loop initial declarations are
                           only allowed in C99 mode

  for (int i = 0; i < n_pages; i++) {
  ^
test_external_mem.c:375:2: note: use option -std=c99 or -std=gnu99 to
                           compile your code

Fixes: b270daa43b3d ("test: support external memory")
Cc: anatoly.burakov@intel.com

Signed-off-by: Dan Gora <dg@adax.com>
---
 test/test/test_external_mem.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/test/test/test_external_mem.c b/test/test/test_external_mem.c
index d0837aa35..998cafa68 100644
--- a/test/test/test_external_mem.c
+++ b/test/test/test_external_mem.c
@@ -362,6 +362,7 @@ test_external_mem(void)
 	rte_iova_t iova[len / pgsz];
 	void *addr;
 	int ret, n_pages;
+	int i;
 
 	/* create external memory area */
 	n_pages = RTE_DIM(iova);
@@ -372,7 +373,7 @@ test_external_mem(void)
 			__func__, __LINE__);
 		return -1;
 	}
-	for (int i = 0; i < n_pages; i++) {
+	for (i = 0; i < n_pages; i++) {
 		/* arbitrary IOVA */
 		rte_iova_t tmp = 0x100000000 + i * pgsz;
 		iova[i] = tmp;
-- 
2.19.0

             reply	other threads:[~2018-10-17  0:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-17  0:22 Dan Gora [this message]
2018-10-17 10:12 ` Burakov, Anatoly
2018-10-23  9:09   ` 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=20181017002244.6117-1-dg@adax.com \
    --to=dg@adax.com \
    --cc=anatoly.burakov@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).