From: Kornel Benko Date: Sun, 23 Jan 2022 19:13:26 +0000 (+0100) Subject: Next runtime messages to be ommitted if compiled with clang using flag '-fsanitize'. X-Git-Tag: 2.4-beta2~914 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=f8f86a1a8172fa8b66ffaf7e04c0b723ee2b4866;p=lyx.git Next runtime messages to be ommitted if compiled with clang using flag '-fsanitize'. Prevent the return of impossible values for 'enum flags'. For instance the result of '~Update::Force' at src/BufferView.cpp:3025 without this patch is '4294967293'. --- diff --git a/src/update_flags.h b/src/update_flags.h index 0efa541122..517bfb62e4 100644 --- a/src/update_flags.h +++ b/src/update_flags.h @@ -46,7 +46,7 @@ inline flags operator&(flags const f, flags const g) inline flags operator~(flags const f) { - return static_cast(~int(f)); + return static_cast(~int(f) & 0x3f); } } // namespace Update