[ghex] Fix build with GCC 6
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ghex] Fix build with GCC 6
- Date: Mon, 13 Jun 2016 13:44:30 +0000 (UTC)
commit 1f39eeffc54d2233231cb2dd4d41fd0c3cf4cdae
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Mon Jun 13 08:41:09 2016 -0500
Fix build with GCC 6
src/chartable.c | 3 +++
src/ghex-window.c | 4 ++++
src/ui.c | 3 +++
3 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/chartable.c b/src/chartable.c
index 3ef1c5f..371526c 100644
--- a/src/chartable.c
+++ b/src/chartable.c
@@ -186,7 +186,10 @@ GtkWidget *create_char_table()
else
row[0] = "";
for(col = 1; col < 4; col++) {
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
label = g_strdup_printf(fmt[col], i);
+#pragma GCC diagnostic pop
row[col] = label;
}
for(col = 0; col < 8; col++) {
diff --git a/src/ghex-window.c b/src/ghex-window.c
index 1cd82d8..b855195 100644
--- a/src/ghex-window.c
+++ b/src/ghex-window.c
@@ -781,6 +781,8 @@ ghex_window_update_status_message(GHexWindow *win)
return;
}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
current_pos = gtk_hex_get_cursor(win->gh);
if(g_snprintf(fmt, FMT_LEN, _("Offset: %s"), offset_fmt) < FMT_LEN) {
g_snprintf(status, STATUS_LEN, fmt, current_pos);
@@ -795,6 +797,8 @@ ghex_window_update_status_message(GHexWindow *win)
}
}
}
+#pragma GCC diagnostic pop
+
ghex_window_show_status(win, status);
}
else
diff --git a/src/ui.c b/src/ui.c
index 4488346..37bc27e 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -112,10 +112,13 @@ create_dialog_title(GtkWidget *window, gchar *title)
win = ghex_window_get_active();
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
if(win != NULL && win->gh != NULL)
full_title = g_strdup_printf(title, win->gh->document->path_end);
else
full_title = g_strdup_printf(title, "");
+#pragma GCC diagnostic pop
if(full_title) {
gtk_window_set_title(GTK_WINDOW(window), full_title);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]