[PATCH 11/14] powerpc/shared/openpic/openpic.c: Ignore warnings for __builtin_frame_address() usage

Joel Sherrill joel at rtems.org
Tue Mar 22 14:40:39 UTC 2016


---
 c/src/lib/libbsp/powerpc/shared/openpic/openpic.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/c/src/lib/libbsp/powerpc/shared/openpic/openpic.c b/c/src/lib/libbsp/powerpc/shared/openpic/openpic.c
index fa37079..39abcd9 100644
--- a/c/src/lib/libbsp/powerpc/shared/openpic/openpic.c
+++ b/c/src/lib/libbsp/powerpc/shared/openpic/openpic.c
@@ -53,6 +53,11 @@ static          int openpic_src_offst = 0;
      */
 
 #if 1
+/* This software deliberately uses non-zero values to the method
+ * __builtin_return_address() and we want to avoid the GCC warning.
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wframe-address"
 #define check_arg_ipi(ipi) \
     if (ipi < 0 || ipi >= OPENPIC_NUM_IPI) \
 	printk("openpic.c:%d: illegal ipi %d\n", __LINE__, ipi);
-- 
1.8.3.1




More information about the devel mailing list