allow Glib__tools build with gcc >= 6 (issue 341500043 by fedelogy@gmail.com)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

allow Glib__tools build with gcc >= 6 (issue 341500043 by fedelogy@gmail.com)

fedelogy
Reviewers: trueroad,

Description:
allow Glib__tools build with gcc >= 6

Pull request sent to Github:
https://github.com/gperciva/gub/pull/47/commits/a02d9ac2c4fba422d42b2d0d32dff58e6d0b67cc

Please review this at https://codereview.appspot.com/341500043/

Affected files (+39, -0 lines):
   M gub/specs/glib.py
   A patches/glib-2.44.1-suppress-string-format-warning.patch


Index: gub/specs/glib.py
diff --git a/gub/specs/glib.py b/gub/specs/glib.py
index  
3ad03c47f2c89c478a4ccfff1c3b65a15dbf7e80..cb1f5f6bd4ee6ef8be366974cfe3716dea4a3c0b  
100644
--- a/gub/specs/glib.py
+++ b/gub/specs/glib.py
@@ -58,6 +58,9 @@ class Glib__freebsd (Glib):
      source  
= 'http://ftp.gnome.org/pub/GNOME/sources/glib/2.38/glib-2.38.2.tar.xz'

  class Glib__tools (tools.AutoBuild, Glib):
+    patches = Glib.patches + [
+        'glib-2.44.1-suppress-string-format-warning.patch',
+    ]
      dependencies = [
              'gettext',
              'libtool',
Index: patches/glib-2.44.1-suppress-string-format-warning.patch
diff --git a/patches/glib-2.44.1-suppress-string-format-warning.patch  
b/patches/glib-2.44.1-suppress-string-format-warning.patch
new file mode 100644
index  
0000000000000000000000000000000000000000..4324b741deba95e6544241229eeb9b150c6c2318
--- /dev/null
+++ b/patches/glib-2.44.1-suppress-string-format-warning.patch
@@ -0,0 +1,36 @@
+From 6e31702eec5ced2d9fd8335aadbd1d450d67c459 Mon Sep 17 00:00:00 2001
+From: Federico Bruni <[hidden email]>
+Date: Fri, 5 Oct 2018 17:45:20 +0200
+Subject: [PATCH] gdate: Suppress string format literal warning
+
+This patch merges two related commits upstream:
+
+https://github.com/GNOME/glib/commit/0817af40e8c74c721c30f6ef482b1f53d12044c7
+
+https://github.com/GNOME/glib/commit/8cdbc7fb2c8c876902e457abe46ee18a0b134486
+---
+ glib/gdate.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/glib/gdate.c b/glib/gdate.c
+index 670f7aa5f..63684a905 100644
+--- a/glib/gdate.c
++++ b/glib/gdate.c
+@@ -2439,6 +2439,9 @@ win32_strftime_helper (const GDate     *d,
+  *
+  * Returns: number of characters written to the buffer, or 0 the buffer  
was too small
+  */
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wformat-nonliteral"
++
+ gsize
+ g_date_strftime (gchar       *s,
+                  gsize        slen,
+@@ -2549,3 +2552,4 @@ g_date_strftime (gchar       *s,
+   return retval;
+ #endif
+ }
++#pragma GCC diagnostic pop
+--
+2.17.1
+



_______________________________________________
lilypond-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-devel