summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDan Gora <dg@adax.com>2018-10-16 21:22:44 -0300
committerThomas Monjalon <thomas@monjalon.net>2018-10-23 11:36:00 +0200
commit51bc78a5a765848b33a09889f596545f9c00c6d7 (patch)
tree92bd6338d90c5c1ba2276cc5f8880417bcdc65b2 /test
parent4dc3db031d6bf556b43adca14841d08431d2e1bf (diff)
downloaddpdk-51bc78a5a765848b33a09889f596545f9c00c6d7.zip
dpdk-51bc78a5a765848b33a09889f596545f9c00c6d7.tar.gz
dpdk-51bc78a5a765848b33a09889f596545f9c00c6d7.tar.xz
test: fix build of external memory test
There was 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") Signed-off-by: Dan Gora <dg@adax.com> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Diffstat (limited to 'test')
-rw-r--r--test/test/test_external_mem.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/test/test_external_mem.c b/test/test/test_external_mem.c
index d0837aa..998cafa 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;