]> git.proxmox.com Git - mirror_lxcfs.git/commitdiff
macro: fix bracket warnings in non-debug mode
authorChristian Brauner <christian.brauner@ubuntu.com>
Thu, 2 Sep 2021 15:02:24 +0000 (17:02 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Thu, 2 Sep 2021 15:03:20 +0000 (17:03 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/macro.h

index 05eee6510015966f2f43337635b3784f9575386f..a7fe05d26ebd156ce7c237a15a1e0a5cba17eaa9 100644 (file)
 #define CGROUP2_SUPER_MAGIC 0x63677270
 #endif
 
-#define lxcfs_debug_stream(stream, format, ...)                                \
-       do {                                                                   \
-               fprintf(stream, "%s: %d: %s: " format "\n", __FILE__, __LINE__,     \
-                       __func__, ##__VA_ARGS__);                                \
+#define lxcfs_debug_stream(stream, format, ...)                       \
+       do {                                                          \
+               fprintf(stream, "%s: %d: %s: " format "\n", __FILE__, \
+                       __LINE__, __func__, ##__VA_ARGS__);           \
        } while (false)
 
 #define lxcfs_error(format, ...) lxcfs_debug_stream(stderr, format, ##__VA_ARGS__)
@@ -39,7 +39,9 @@
 #ifdef DEBUG
 #define lxcfs_debug(format, ...) lxcfs_error(format, ##__VA_ARGS__)
 #else
-#define lxcfs_debug(format, ...)
+#define lxcfs_debug(format, ...) \
+       do {                     \
+       } while (false)
 #endif /* DEBUG */
 
 #ifdef VERBOSE