From: Nélio Laranjeiro Date: Thu, 23 Nov 2017 10:02:38 +0000 (+0100) Subject: crypto: fix pedantic compilation X-Git-Tag: spdx-start~121 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=81c8dff2fd3d5d0f32961002011187ca92d3fef5;p=dpdk.git crypto: fix pedantic compilation /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 --- 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 */