Skip to content
Commit 30b26304 authored by Stephen Hines's avatar Stephen Hines
Browse files

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
parent c7b15b95
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment