[rtems commit] powerpc/shared/openpic/openpic.c: Ignore warnings for __builtin_frame_address() usage

Joel Sherrill joel at rtems.org
Thu Mar 24 16:58:38 UTC 2016


Module:    rtems
Branch:    master
Commit:    561dec5ec40381c3f205a03041b50f8576d0bed1
Changeset: http://git.rtems.org/rtems/commit/?id=561dec5ec40381c3f205a03041b50f8576d0bed1

Author:    Joel Sherrill <joel at rtems.org>
Date:      Mon Mar 21 10:53:32 2016 -0500

powerpc/shared/openpic/openpic.c: Ignore warnings for __builtin_frame_address() usage

---

 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);




More information about the vc mailing list