[gnome-commander] Do not warn about unused result here - it is save to do so
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] Do not warn about unused result here - it is save to do so
- Date: Fri, 28 Apr 2017 21:34:19 +0000 (UTC)
commit 9e219dfaf53f4c23e769075aa2f4123561c23f0f
Author: Uwe Scholz <uwescholz src gnome org>
Date: Mon Apr 17 14:07:34 2017 +0200
Do not warn about unused result here - it is save to do so
src/gnome-cmd-python-plugin.cc | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/src/gnome-cmd-python-plugin.cc b/src/gnome-cmd-python-plugin.cc
index 89e96b5..ad204f3 100644
--- a/src/gnome-cmd-python-plugin.cc
+++ b/src/gnome-cmd-python-plugin.cc
@@ -44,7 +44,8 @@ static gint compare_plugins(const PythonPluginData *p1, const PythonPluginData *
return g_ascii_strcasecmp (p1->name, p2->name);
}
-
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-result"
static void scan_plugins_in_dir (const gchar *dpath)
{
DIR *dir = opendir(dpath);
@@ -57,11 +58,11 @@ static void scan_plugins_in_dir (const gchar *dpath)
long dir_size = pathconf(".", _PC_PATH_MAX);
- if (dir_size==-1)
- {
- g_warning ( "pathconf(\".\"): %s", strerror(errno));
- return;
- }
+ if (dir_size==-1)
+ {
+ g_warning ( "pathconf(\".\"): %s", strerror(errno));
+ return;
+ }
gchar *prev_dir = (gchar *) g_malloc (dir_size);
@@ -125,7 +126,7 @@ static void scan_plugins_in_dir (const gchar *dpath)
g_free (prev_dir);
}
-
+#pragma GCC diagnostic pop
void python_plugin_manager_init ()
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]