DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] test: fix compilation error in external memory test
@ 2018-10-17  0:22 Dan Gora
  2018-10-17 10:12 ` Burakov, Anatoly
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Gora @ 2018-10-17  0:22 UTC (permalink / raw)
  To: dev; +Cc: Dan Gora, anatoly.burakov

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] test: fix compilation error in external memory test
  2018-10-17  0:22 [dpdk-dev] [PATCH] test: fix compilation error in external memory test Dan Gora
@ 2018-10-17 10:12 ` Burakov, Anatoly
  2018-10-23  9:09   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Burakov, Anatoly @ 2018-10-17 10:12 UTC (permalink / raw)
  To: Dan Gora, dev

On 17-Oct-18 1:22 AM, Dan Gora wrote:
> 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>
> ---

Oops

Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>

-- 
Thanks,
Anatoly

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] test: fix compilation error in external memory test
  2018-10-17 10:12 ` Burakov, Anatoly
@ 2018-10-23  9:09   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2018-10-23  9:09 UTC (permalink / raw)
  To: Dan Gora; +Cc: dev, Burakov, Anatoly

17/10/2018 12:12, Burakov, Anatoly:
> On 17-Oct-18 1:22 AM, Dan Gora wrote:
> > 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>
> > ---
> 
> Oops
> 
> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-10-23  9:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-17  0:22 [dpdk-dev] [PATCH] test: fix compilation error in external memory test Dan Gora
2018-10-17 10:12 ` Burakov, Anatoly
2018-10-23  9:09   ` Thomas Monjalon

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).