[evince/gnome-3-20] Fix build with GCC 6
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince/gnome-3-20] Fix build with GCC 6
- Date: Thu, 23 Jun 2016 16:14:51 +0000 (UTC)
commit 62fbd8c9aab70547a668bd435e29c3ca8d95ee48
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Tue May 17 06:21:15 2016 -0500
Fix build with GCC 6
Both usages looooook safe.
backend/comics/comics-document.c | 5 ++++-
libdocument/ev-document-misc.c | 3 +++
2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/backend/comics/comics-document.c b/backend/comics/comics-document.c
index a861f0d..1d15428 100644
--- a/backend/comics/comics-document.c
+++ b/backend/comics/comics-document.c
@@ -238,9 +238,11 @@ comics_decompress_temp_dir (const gchar *command_decompress_tmp,
return FALSE;
}
-/* This function shows how to use the choosen command for decompressing a
+/* This function shows how to use the chosen command for decompressing a
* comic book file. It modifies fields of the ComicsDocument struct with
* this information */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
static gboolean
comics_generate_command_lines (ComicsDocument *comics_document,
GError **error)
@@ -296,6 +298,7 @@ comics_generate_command_lines (ComicsDocument *comics_document,
}
}
+#pragma GCC diagnostic pop
/* This function chooses an external command for decompressing a comic
* book based on its mime tipe. */
diff --git a/libdocument/ev-document-misc.c b/libdocument/ev-document-misc.c
index 6d3c820..a3ba592 100644
--- a/libdocument/ev-document-misc.c
+++ b/libdocument/ev-document-misc.c
@@ -528,6 +528,8 @@ ev_document_misc_format_date (GTime utime)
char s[256];
const char fmt_hack[] = "%c";
size_t len;
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-y2k"
#ifdef HAVE_LOCALTIME_R
struct tm t;
if (time == 0 || !localtime_r (&time, &t)) return NULL;
@@ -537,6 +539,7 @@ ev_document_misc_format_date (GTime utime)
if (time == 0 || !(t = localtime (&time)) ) return NULL;
len = strftime (s, sizeof (s), fmt_hack, t);
#endif
+#pragma GCC diagnostic pop
if (len == 0 || s[0] == '\0') return NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]