crypto: fix pedantic compilation
authorNélio Laranjeiro <nelio.laranjeiro@6wind.com>
Thu, 23 Nov 2017 10:02:38 +0000 (11:02 +0100)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Sat, 20 Jan 2018 15:08:34 +0000 (16:08 +0100)
/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 <nelio.laranjeiro@6wind.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
lib/librte_cryptodev/rte_crypto.h

index bbc510d..95cf861 100644 (file)
@@ -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 */