[systemd-commits] 2 commits - TODO src/shared

Lennart Poettering lennart at kemper.freedesktop.org
Thu Feb 20 09:07:07 PST 2014


 TODO               |    4 ++++
 src/shared/macro.h |   23 +++++++++++++++++++++--
 2 files changed, 25 insertions(+), 2 deletions(-)

New commits:
commit beb999379ced9e8d765e533e43d35aab11aa5c39
Author: Lennart Poettering <lennart at poettering.net>
Date:   Thu Feb 20 18:06:35 2014 +0100

    update TODO

diff --git a/TODO b/TODO
index 2555513..0ae1427 100644
--- a/TODO
+++ b/TODO
@@ -27,6 +27,10 @@ External:
 
 Features:
 
+* nspawn: name normal veth ifaces on the host "ve-*", and those
+  already added to a bridge "vb-*". That way we can later on install
+  catchall matches that identify these interfaces and run DHCP on them.
+
 * "busctl status" works only as root on dbus1, since we cannot read
   /proc/$PID/exe
 

commit 7ebe131a9f37fe5a3a15f69962d21cb7e063dff8
Author: Lennart Poettering <lennart at poettering.net>
Date:   Thu Feb 20 18:05:56 2014 +0100

    util: get rid of warnings around assert_cc() macro
    
    Suggested by Holger Schurig.

diff --git a/src/shared/macro.h b/src/shared/macro.h
index dfbc201..959a9f7 100644
--- a/src/shared/macro.h
+++ b/src/shared/macro.h
@@ -46,6 +46,14 @@
 #define _alignas_(x) __attribute__((aligned(__alignof(x))))
 #define _cleanup_(x) __attribute__((cleanup(x)))
 
+/* Temporarily disable some warnings */
+#define DISABLE_WARNING_DECLARATION_AFTER_STATEMENT                     \
+        _Pragma("GCC diagnostic push");                                 \
+        _Pragma("GCC diagnostic ignored \"-Wdeclaration-after-statement\"")
+
+#define REENABLE_WARNING                                                \
+        _Pragma("GCC diagnostic pop")
+
 /* automake test harness */
 #define EXIT_TEST_SKIP 77
 
@@ -154,9 +162,20 @@ static inline size_t ALIGN_TO(size_t l, size_t ali) {
         } while (false)
 
 #if defined(static_assert)
-#define assert_cc(expr) static_assert(expr, #expr)
+/* static_assert() is sometimes defined in a way that trips up
+ * -Wdeclaration-after-statement, hence let's temporarily turn off
+ * this warning around it. */
+#define assert_cc(expr)                                                 \
+        DISABLE_WARNING_DECLARATION_AFTER_STATEMENT;                    \
+        static_assert(expr, #expr);                                     \
+        REENABLE_WARNING
 #else
-#define assert_cc(expr) struct UNIQUE(_assert_struct_) { char x[(expr) ? 0 : -1]; };
+#define assert_cc(expr)                                                 \
+        DISABLE_WARNING_DECLARATION_AFTER_STATEMENT;                    \
+        struct UNIQUE(_assert_struct_) {                                \
+                char x[(expr) ? 0 : -1];                                \
+        };                                                              \
+        REENABLE_WARNING
 #endif
 
 #define assert_return(expr, r)                                          \



More information about the systemd-commits mailing list