[gnome-commander/ConvertWarningsToErrors] src/gnome-cmd-file-selector.cc: Remove warnings for -Wormat-nonliteral



commit 1a3701a9f75b5706f28b1532b5adb89f425fce69
Author: Uwe Scholz <uwescholz src gnome org>
Date:   Sun Apr 23 13:17:08 2017 +0200

    src/gnome-cmd-file-selector.cc: Remove warnings for -Wormat-nonliteral

 src/gnome-cmd-file.cc |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/src/gnome-cmd-file.cc b/src/gnome-cmd-file.cc
index 0952dc8..5ccc5af 100644
--- a/src/gnome-cmd-file.cc
+++ b/src/gnome-cmd-file.cc
@@ -663,7 +663,14 @@ inline void do_view_file (GnomeCmdFile *f, gint internal_viewer=-1)
 
         case FALSE: {
                         gchar *filename = f->get_quoted_real_path();
+#if defined (__GNUC__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+#endif
                         gchar *command = g_strdup_printf (gnome_cmd_data.options.viewer, filename);
+#if defined (__GNUC__)
+#pragma GCC diagnostic pop
+#endif
                         run_command (command);
                         g_free (filename);
                     }
@@ -727,7 +734,14 @@ void gnome_cmd_file_edit (GnomeCmdFile *f)
 
     gchar *fpath = f->get_quoted_real_path();
     gchar *dpath = f->get_unescaped_dirname();
+#if defined (__GNUC__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+#endif
     gchar *command = g_strdup_printf (gnome_cmd_data.options.editor, fpath);
+#if defined (__GNUC__)
+#pragma GCC diagnostic pop
+#endif
 
     run_command_indir (command, dpath, FALSE);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]