From 2ac903e6ce6d7d08570e56a6178a2cf2321bf9d5 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 29 Nov 2022 21:08:12 +0100 Subject: [PATCH] c-stdaux: revert "generic: use _c_likely_() in c_assert()" The change that c_assert() now uses a runtime construct _c_boolean_expr() causes a "-Wsometimes-uninitialized" warning with clang ([1]). Revert the patch for now. This reverts c-stdaux commit [2]. [1] https://github.com/c-util/c-stdaux/pull/11#issuecomment-1331233011 [2] https://github.com/c-util/c-stdaux/commit/2cda8dc53a9acf57697312228c058c4a86385ef8 --- src/c-stdaux/src/c-stdaux-generic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/c-stdaux/src/c-stdaux-generic.h b/src/c-stdaux/src/c-stdaux-generic.h index 86be1d317..e032b5d68 100644 --- a/src/c-stdaux/src/c-stdaux-generic.h +++ b/src/c-stdaux/src/c-stdaux-generic.h @@ -299,7 +299,7 @@ extern "C" { * optimize it away. */ #define c_assert(_x) ( \ - _c_likely_(_x) \ + (bool)(_x) \ ? assert(true && #_x) \ : assert(false && #_x) \ )