[recipes] Fix a compiler warning
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] Fix a compiler warning
- Date: Tue, 28 Feb 2017 20:59:40 +0000 (UTC)
commit a17bdfcf6f95af09761fb62adfa08baa83232c9a
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Feb 28 15:34:34 2017 -0500
Fix a compiler warning
The warning was -Wformat-nonliteral.
src/gr-about-dialog.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/gr-about-dialog.c b/src/gr-about-dialog.c
index ffb1257..488263e 100644
--- a/src/gr-about-dialog.c
+++ b/src/gr-about-dialog.c
@@ -333,6 +333,8 @@ text_buffer_append (GtkTextBuffer *buffer,
gtk_text_buffer_insert (buffer, &iter, text, -1);
}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
static void
text_buffer_append_printf (GtkTextBuffer *buffer,
const char *format,
@@ -343,15 +345,14 @@ text_buffer_append_printf (GtkTextBuffer *buffer,
int len;
va_start (args, format);
-
len = g_vasprintf (&buf, format, args);
if (len >= 0) {
text_buffer_append (buffer, buf);
g_free (buf);
}
-
va_end (args);
}
+#pragma GCC diagnostic pop
static void
text_buffer_append_link (GtkTextView *view,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]