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

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

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.15.0
    • 0.16.0
    • 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

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            jbapple Jim Apple
            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

                Slack

                  Issue deployment