Fix invalid logical constant creation.
This code incorrectly uses || to combine a bunch of state constants. The next Clang warns on this buggy pattern. hardware/qcom/media/msm8996/mm-video-v4l2/vidc/venc/src/omx_video_base.cpp:1130:40: error: use of logical '||' with constant operand [-Werror,-Wconstant-logical-operand] if (eState == (OMX_StateLoaded || OMX_StateWaitForResources ^ ~~~~~~~~~~~~~~~~~~~~~~~~~ hardware/qcom/media/msm8996/mm-video-v4l2/vidc/venc/src/omx_video_base.cpp:1130:40: note: use '|' for a bitwise operation if (eState == (OMX_StateLoaded || OMX_StateWaitForResources ^~ | Bug: http://b/110779387 Test: ./test_compiler.py --build-only --target aosp_sailfish-eng --no-clean-built-target ../../ --clang-path ../../prebuilts/clang/host/linux-x86/llvm-toolchain-dev/ Change-Id: I7332508f0f9827c7968a4680fe42eedffb3714e7
Loading
Please register or sign in to comment