From 81c8dff2fd3d5d0f32961002011187ca92d3fef5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?N=C3=A9lio=20Laranjeiro?= Date: Thu, 23 Nov 2017 11:02:38 +0100 Subject: [PATCH] crypto: fix pedantic compilation MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit /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 a union. Fixes: d2a4223c4c6d ("cryptodev: do not store pointer to op specific params") Cc: stable@dpdk.org Signed-off-by: Nelio Laranjeiro Acked-by: Pablo de Lara --- 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 bbc510d617..95cf8615e2 100644 --- a/lib/librte_cryptodev/rte_crypto.h +++ b/lib/librte_cryptodev/rte_crypto.h @@ -93,7 +93,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.20.1