test: fix compilation error in external memory test
PATCH 1/1 test: fix compilation error in external memory test
Fix a compilation error in test_external_mem.c:
CC test_external_mem.otest_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
--- test/test/test_external_mem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
test/test/test_external_mem.c +2 -1
@@ -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;
Signature · 1 line
2.19.0
Quoted 9 lines · Dan Gora
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 modefor (int i = 0; i < n_pages; i++) { ^
Quoted 8 lines
test_external_mem.c:375:2: note: use option -std=c99 or -std=gnu99 to
compile your codeFixes b270daa43b3d ("test: support external memory")Signed-off-by Dan Gora <[email protected]>---
Oops
Signature · 2 lines
Thanks, Anatoly
Thomas Monjalon
Applied17/10/2018 12:12, Burakov, Anatoly:
Quoted 16 lines · Dan Gora
Quoted 15 lines
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 modefor (int i = 0; i < n_pages; i++) { ^test_external_mem.c:375:2: note: use option -std=c99 or -std=gnu99 to
compile your codeFixes b270daa43b3d ("test: support external memory")
Quoted 6 lines
Quoted 2 lines
Signed-off-by Dan Gora <[email protected]>---
Oops
Acked-by Anatoly Burakov <[email protected]>
Applied, thanks