Ambiguous bool to int conversion
hfiguiere opened this issue · 0 comments
hfiguiere commented
This is triggered by clang -Wint-in-bool-context
XMPFiles/source/FileHandlers/FLV_Handler.cpp:200:55: warning: converting the result of '<<' to a boolean; did you mean '(buffer[7] << 24) != 0'? [-Wint-in-bool-context]
info->time = GetUns24BE ( &buffer[4] ) || (buffer[7] << 24);
^
1 warning generated.
Expected Behaviour
Properly written code, no warning.
Actual Behaviour
Seems to want to put a bool
value into an XMP_Uns32
with implicit conversion. Seems to be wrong.
Reproduce Scenario (including but not limited to)
Steps to Reproduce
Build with clang (Linux) with -Wint-in-bool-context
Platform and Version
clang version 13.0.0 (Fedora 13.0.0-3.fc35)