[gnome-commander/ConvertWarningsToErrors] 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/ConvertWarningsToErrors] Do not warn about unused result here - it is save to do so
- Date: Mon, 17 Apr 2017 12:07:51 +0000 (UTC)
commit 714a4cd8318e8d460c386011841effdb597122b7
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]