Commit a541fca0 authored by Michael Catanzaro's avatar Michael Catanzaro

Fix build with GCC 6

Both usages looooook safe.
parent 65757930
......@@ -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. */
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment