diff mbox series

crypto/dpaa2_sec: fix build with GCC 6 or prior

Message ID 1517304210-15061-1-git-send-email-hemant.agrawal@nxp.com
State Accepted
Commit 367bc2a9fd7095ccf500977b276c6b70bf1b2df3
Headers show
Series crypto/dpaa2_sec: fix build with GCC 6 or prior | expand

Commit Message

Hemant Agrawal Jan. 30, 2018, 9:23 a.m. UTC
This patch fixes the compilation with compiler GCC < 7

dpaa2_sec/hw/rta/operation_cmd.h:12:32: error: unknown option after
 ‘#pragma GCC diagnostic’ kind [-Werror=pragmas]
 #pragma GCC diagnostic ignored "-Wimplicit-fallthrough"

Fixes: 2ab9a9483196 ("crypto/dpaa2_sec: fix build with GCC 7")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>

---
 drivers/crypto/dpaa2_sec/hw/rta/operation_cmd.h | 2 ++
 1 file changed, 2 insertions(+)

-- 
2.7.4

Comments

Thomas Monjalon Jan. 30, 2018, 2:01 p.m. UTC | #1
30/01/2018 10:23, Hemant Agrawal:
> This patch fixes the compilation with compiler GCC < 7

> 

> dpaa2_sec/hw/rta/operation_cmd.h:12:32: error: unknown option after

>  ‘#pragma GCC diagnostic’ kind [-Werror=pragmas]

>  #pragma GCC diagnostic ignored "-Wimplicit-fallthrough"

> 

> Fixes: 2ab9a9483196 ("crypto/dpaa2_sec: fix build with GCC 7")


Sorry for having broken it with a quick fix yesterday.

> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>

[...]
> +#if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION > 70000)

>  #pragma GCC diagnostic ignored "-Wimplicit-fallthrough"

> +#endif


I think it must be GCC_VERSION >= 70000

Applied with this change, thanks
diff mbox series

Patch

diff --git a/drivers/crypto/dpaa2_sec/hw/rta/operation_cmd.h b/drivers/crypto/dpaa2_sec/hw/rta/operation_cmd.h
index c4febcb..90ce39f 100644
--- a/drivers/crypto/dpaa2_sec/hw/rta/operation_cmd.h
+++ b/drivers/crypto/dpaa2_sec/hw/rta/operation_cmd.h
@@ -8,7 +8,9 @@ 
 #ifndef __RTA_OPERATION_CMD_H__
 #define __RTA_OPERATION_CMD_H__
 
+#if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION > 70000)
 #pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
+#endif
 
 extern enum rta_sec_era rta_sec_era;