From 1d789ca44b3ac077a29886bccd34f978f4862701 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 6 Aug 2021 20:15:09 +0200 Subject: [PATCH] std-aux: add XXX() macro --- src/libnm-std-aux/nm-std-aux.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libnm-std-aux/nm-std-aux.h b/src/libnm-std-aux/nm-std-aux.h index 2747338576..7d34920438 100644 --- a/src/libnm-std-aux/nm-std-aux.h +++ b/src/libnm-std-aux/nm-std-aux.h @@ -209,6 +209,13 @@ typedef uint64_t _nm_bitwise nm_be64_t; } while (0) #endif +/* This is similar nm_assert_not_reached(), but it's supposed to be used only during + * development. Like _XXX_ comments, they can be used as a marker that something still + * needs to be done. */ +#define XXX(msg) \ + nm_assert(!"X" \ + "XX error: " msg "") + #define nm_assert_unreachable_val(val) \ ({ \ nm_assert_not_reached(); \