[dpdk-dev] [PATCH v2 2/3] crypto: fix pedantic compilation errors
Nelio Laranjeiro
nelio.laranjeiro at 6wind.com
Thu Nov 23 11:02:38 CET 2017
/root/dpdk/x86_64-native-linuxapp-gcc/include/rte_crypto.h:126:28: error: ISO C forbids zero-size array ‘sym’ [-Werror=pedantic]
struct rte_crypto_sym_op sym[0];
^~~
Zero-size array is an extension to the language it cannot be replaced by a
empty size array i.e. [] because structure is inside an union.
Fixes: d2a4223c4c6d ("cryptodev: do not store pointer to op specific params")
Cc: pablo.de.lara.guarch at intel.com
Cc: stable at dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro at 6wind.com>
---
Changes in v2:
replace RTE_STD_C11 by __extension__
---
lib/librte_cryptodev/rte_crypto.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_cryptodev/rte_crypto.h b/lib/librte_cryptodev/rte_crypto.h
index 3d672fe7d..6f0b29732 100644
--- a/lib/librte_cryptodev/rte_crypto.h
+++ b/lib/librte_cryptodev/rte_crypto.h
@@ -121,7 +121,7 @@ struct rte_crypto_op {
rte_iova_t phys_addr;
/**< physical address of crypto operation */
- RTE_STD_C11
+ __extension__
union {
struct rte_crypto_sym_op sym[0];
/**< Symmetric operation parameters */
--
2.11.0
More information about the dev
mailing list