[PATCH 1/4] settings: Fix PLUGIN_PRINT / PLUGIN_WARN macros
- From: Thomas Haller <thaller redhat com>
- To: networkmanager-list gnome org
- Subject: [PATCH 1/4] settings: Fix PLUGIN_PRINT / PLUGIN_WARN macros
- Date: Thu, 25 Feb 2016 19:20:10 +0100
From: Dan Winship <danw gnome org>
Use G_STMT_START / G_STMT_END so that they behave properly as single
statements in all contexts.
---
src/settings/nm-system-config-interface.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/settings/nm-system-config-interface.h b/src/settings/nm-system-config-interface.h
index 96a6406..5115dab 100644
--- a/src/settings/nm-system-config-interface.h
+++ b/src/settings/nm-system-config-interface.h
@@ -30,10 +30,10 @@
G_BEGIN_DECLS
#define PLUGIN_PRINT(pname, fmt, args...) \
- { g_message (" " pname ": " fmt, ##args); }
+ G_STMT_START { g_message (" " pname ": " fmt, ##args); } G_STMT_END
#define PLUGIN_WARN(pname, fmt, args...) \
- { g_warning (" " pname ": " fmt, ##args); }
+ G_STMT_START { g_warning (" " pname ": " fmt, ##args); } G_STMT_END
/* Plugin's factory function that returns a GObject that implements
--
2.5.0
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]