mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-09 23:27:23 +02:00
refactor: Use static_cast<decltype(...)> to suppress integer sanitizer warning
This refactor does not change any behavior, except for the integer sanitizer warning. Can be tested via: UBSAN_OPTIONS="suppressions=$(pwd)/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1:report_error_type=1" ./bld-cmake/bin/bitcoin-cli -stdinrpcpass uptime
This commit is contained in:
@@ -43,7 +43,7 @@ void SetStdinEcho(bool enable)
|
||||
return;
|
||||
}
|
||||
if (!enable) {
|
||||
tty.c_lflag &= ~ECHO;
|
||||
tty.c_lflag &= static_cast<decltype(tty.c_lflag)>(~ECHO);
|
||||
} else {
|
||||
tty.c_lflag |= ECHO;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user