DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] event/opdl: fix build using C99 mode
@ 2018-01-21  9:48 Andrew Rybchenko
  2018-01-21 10:52 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Rybchenko @ 2018-01-21  9:48 UTC (permalink / raw)
  To: dev; +Cc: Liang Ma, Peter Mccarthy, Jerin Jacob, Thomas Monjalon

RHEL 7.4 gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)

‘for’ loop initial declarations are only allowed in C99 mode

Fixes: 4236ce9bf5bf ("event/opdl: add OPDL ring infrastructure library")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
Other option is to move declarations outside of for loop.
I just want it to be fixed.

 drivers/event/opdl/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/event/opdl/Makefile b/drivers/event/opdl/Makefile
index 747ae5b..a8aff2c 100644
--- a/drivers/event/opdl/Makefile
+++ b/drivers/event/opdl/Makefile
@@ -7,6 +7,8 @@ include $(RTE_SDK)/mk/rte.vars.mk
 LIB = librte_pmd_opdl_event.a
 
 # build flags
+CFLAGS += -std=c99
+CFLAGS += -D_XOPEN_SOURCE=600
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
 # for older GCC versions, allow us to initialize an event using
-- 
2.7.4

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

* Re: [dpdk-dev] [PATCH] event/opdl: fix build using C99 mode
  2018-01-21  9:48 [dpdk-dev] [PATCH] event/opdl: fix build using C99 mode Andrew Rybchenko
@ 2018-01-21 10:52 ` Thomas Monjalon
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2018-01-21 10:52 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: dev, Liang Ma, Peter Mccarthy, Jerin Jacob

21/01/2018 10:48, Andrew Rybchenko:
> RHEL 7.4 gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)
> 
> ‘for’ loop initial declarations are only allowed in C99 mode
> 
> Fixes: 4236ce9bf5bf ("event/opdl: add OPDL ring infrastructure library")
> 
> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
> ---
> Other option is to move declarations outside of for loop.
> I just want it to be fixed.

Yes, other option would be to comply with DPDK coding style.
Let's fix it with std=C99, waiting for coding style fix.

Applied, thanks

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

end of thread, other threads:[~2018-01-21 10:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-21  9:48 [dpdk-dev] [PATCH] event/opdl: fix build using C99 mode Andrew Rybchenko
2018-01-21 10:52 ` 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).