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] 2cda8dc53a
This commit is contained in:
@@ -299,7 +299,7 @@ extern "C" {
|
||||
* optimize it away.
|
||||
*/
|
||||
#define c_assert(_x) ( \
|
||||
_c_likely_(_x) \
|
||||
(bool)(_x) \
|
||||
? assert(true && #_x) \
|
||||
: assert(false && #_x) \
|
||||
)
|
||||
|
Reference in New Issue
Block a user