[gnome-builder] gcc: ignore _FORTIFY_SOURCE warnings



commit bf6f3e2eaab2b16970204793f4fd127e099560f9
Author: Christian Hergert <chergert redhat com>
Date:   Sun Jul 17 02:46:00 2016 -0700

    gcc: ignore _FORTIFY_SOURCE warnings

 plugins/gcc/gbp-gcc-build-result-addin.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/plugins/gcc/gbp-gcc-build-result-addin.c b/plugins/gcc/gbp-gcc-build-result-addin.c
index 6609c6a..2453d8a 100644
--- a/plugins/gcc/gbp-gcc-build-result-addin.c
+++ b/plugins/gcc/gbp-gcc-build-result-addin.c
@@ -100,10 +100,15 @@ create_diagnostic (GbpGccBuildResultAddin *self,
   g_assert (GBP_IS_GCC_BUILD_RESULT_ADDIN (self));
   g_assert (match_info != NULL);
 
+  message = g_match_info_fetch_named (match_info, "message");
+
+  /* Ignore _FORTIFY_SOURCE warnings which require optimization */
+  if (message != NULL && (strncmp (message, "#warning _FORTIFY_SOURCE requires compiling with optimization", 
61) == 0))
+    return NULL;
+
   filename = g_match_info_fetch_named (match_info, "filename");
   line = g_match_info_fetch_named (match_info, "line");
   column = g_match_info_fetch_named (match_info, "column");
-  message = g_match_info_fetch_named (match_info, "message");
   level = g_match_info_fetch_named (match_info, "level");
 
   parsed.line = g_ascii_strtoll (line, NULL, 10);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]