[dpdk-dev] net/mlx5: fix compilation issue in debug mode
Checks
Commit Message
Even in C11, using types other than _Bool or signed/unsigned int for
bit-fields is an extension. Some GCC versions complain about that when
-pedantic checks are enabled.
The RTE_STD_C11 macro correctly prevented this issue with C99 but not with
C11 as it becomes a no-op. Forcing the extension keyword addresses it.
Fixes: 143c03925695 ("net/mlx: update C compliance standard")
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Tested-by: Yongseok Koh <yskoh@mellanox.com>
---
Ferruh, squashing this commit with the previous one and discarding its
log is fine if you want. Thanks.
---
drivers/net/mlx5/mlx5_rxtx.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On 7/3/2017 9:27 AM, Adrien Mazarguil wrote:
> Even in C11, using types other than _Bool or signed/unsigned int for
> bit-fields is an extension. Some GCC versions complain about that when
> -pedantic checks are enabled.
>
> The RTE_STD_C11 macro correctly prevented this issue with C99 but not with
> C11 as it becomes a no-op. Forcing the extension keyword addresses it.
>
> Fixes: 143c03925695 ("net/mlx: update C compliance standard")
>
> Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> Tested-by: Yongseok Koh <yskoh@mellanox.com>
> ---
> Ferruh, squashing this commit with the previous one and discarding its
> log is fine if you want. Thanks.
Squashed into relevant commit in next-net, thanks.
@@ -240,7 +240,7 @@ struct hash_rxq {
};
/* TX queue descriptor. */
-RTE_STD_C11
+__extension__
struct txq {
uint16_t elts_head; /* Current index in (*elts)[]. */
uint16_t elts_tail; /* First element awaiting completion. */