From 3b0f068eaf837b52afa8f4b0fa666e285b8f8627 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 28 May 2019 14:10:54 +1000 Subject: [PATCH] Warn if NDEBUG is defined We rely on assert() too much for safety checks, let's not let the user disable it without warning Fixes #262 Signed-off-by: Peter Hutterer --- src/libinput-util.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libinput-util.h b/src/libinput-util.h index 270c05e8..c267abc0 100644 --- a/src/libinput-util.h +++ b/src/libinput-util.h @@ -27,6 +27,10 @@ #include "config.h" +#ifdef NDEBUG +#warning "libinput relies on assert(). #defining NDEBUG is not recommended" +#endif + #include #include #include