File: gdate-suppress-string-format-literal-warning.patch

package info (click to toggle)
qtwebkit-opensource-src 5.212.0~alpha4-30
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 126,360 kB
  • sloc: cpp: 1,399,204; javascript: 111,961; ansic: 29,742; perl: 19,510; python: 13,364; ruby: 10,299; xml: 9,342; asm: 5,078; yacc: 2,166; lex: 906; sh: 417; makefile: 34
file content (29 lines) | stat: -rw-r--r-- 903 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From 3a7efd598d39366c2c9de0def2fdfb35e5e9f2a1 Mon Sep 17 00:00:00 2001
From: coypu <coypu@sdf.org>
Date: Mon, 8 Feb 2016 00:06:06 +0200
Subject: [PATCH 1/1] gdate: Suppress string format literal warning

Newer versions of GCC emit an error here, but we know it's safe.
https://bugzilla.gnome.org/761550
---
 glib/gdate.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/glib/gdate.c b/glib/gdate.c
index 4aece02..cdc735c 100644
--- a/glib/gdate.c
+++ b/glib/gdate.c
@@ -2494,7 +2494,10 @@ g_date_strftime (gchar       *s,
        * recognize whether strftime actually failed or just returned "".
        */
       tmpbuf[0] = '\1';
+      #pragma GCC diagnostic push
+      #pragma GCC diagnostic ignored "-Wformat-nonliteral"
       tmplen = strftime (tmpbuf, tmpbufsize, locale_format, &tm);
+      #pragma GCC diagnostic pop
 
       if (tmplen == 0 && tmpbuf[0] != '\0')
         {
-- 
2.7.0