Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 1 | From 4ebdf8023f763f75a7e1b548894de2e8b784f4a8 Mon Sep 17 00:00:00 2001 |
| 2 | From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com> |
| 3 | Date: Fri, 29 Jul 2016 23:19:40 +0200 |
| 4 | Subject: [PATCH] suppress string format literal warning to fix build with gcc6 |
| 5 | MIME-Version: 1.0 |
| 6 | Content-Type: text/plain; charset=UTF-8 |
| 7 | Content-Transfer-Encoding: 8bit |
| 8 | |
| 9 | Upstream-Status: Pending |
| 10 | |
| 11 | Signed-off-by: Andreas MΓΌller <schnitzeltony@googlemail.com> |
| 12 | --- |
| 13 | plugins/time/gedit-time-plugin.c | 3 +++ |
| 14 | 1 file changed, 3 insertions(+) |
| 15 | |
| 16 | diff --git a/plugins/time/gedit-time-plugin.c b/plugins/time/gedit-time-plugin.c |
| 17 | index d2ffdb9..441d9f9 100644 |
| 18 | --- a/plugins/time/gedit-time-plugin.c |
| 19 | +++ b/plugins/time/gedit-time-plugin.c |
| 20 | @@ -473,12 +473,15 @@ get_time (const gchar* format) |
| 21 | clock = time (NULL); |
| 22 | now = localtime (&clock); |
| 23 | |
| 24 | +#pragma GCC diagnostic push |
| 25 | +#pragma GCC diagnostic ignored "-Wformat-nonliteral" |
| 26 | do |
| 27 | { |
| 28 | out_length += 255; |
| 29 | out = g_realloc (out, out_length); |
| 30 | } |
| 31 | while (strftime (out, out_length, locale_format, now) == 0); |
| 32 | +#pragma GCC diagnostic pop |
| 33 | |
| 34 | g_free (locale_format); |
| 35 | |
| 36 | -- |
| 37 | 2.5.5 |
| 38 | |