vclock: fix ub sanitizer warnings of int shifting by 31 bits
Caught the following error with UB sanitizer after trying to use the 31-st vclock component in one of the tests: NO_WRAP ``` [040] +/opt/actions-runner/_work/tarantool/tarantool/src/lib/vclock/vclock.c:133:21: runtime error: left shift of 1 by 31 places cannot be represented in type 'int' [040] +SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /opt/actions-runner/_work/tarantool/tarantool/src/lib/vclock/vclock.c:133:21 in [040] Test "unit/vclock.test", conf: "None" [040] failed, rerunning ... [040] unit/vclock.test [ fail ] ``` NO_WRAP Let's fix this in all the affected places. NO_DOC=refactoring NO_TEST=already tested by unit/vclock.cc: test_minmax_ignore0() NO_CHANGELOG=refactoring
Loading
Please register or sign in to comment