Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-7395

[C++] Logical "or" with constants is a Clang warning

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.15.0
    • Fix Version/s: 0.16.0
    • Component/s: C++

      Description

      With clang version 9.0.1, the C++ debug build fails with:

      In file included from /home/jbapple/code/arrow/cpp/src/arrow/vendored/xxhash/xxhash.h:532:
      /home/jbapple/code/arrow/cpp/src/arrow/vendored/xxhash/xxhash.c:810:11: error: use of logical '||' with constant operand [-Werror,-Wconstant-logical-operand]
          if (0 || 0) {
                ^  ~
      /home/jbapple/code/arrow/cpp/src/arrow/vendored/xxhash/xxhash.c:810:11: note: use '|' for a bitwise operation
          if (0 || 0) {
                ^~
                |
      

      The simple fix is to add -Wno-constant-logical-operand to SetupCxxFlags.cmake.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jbapple Jim Apple
                Reporter:
                jbapple Jim Apple
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m