You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Wes McKinney (Jira)" <ji...@apache.org> on 2019/12/16 19:57:00 UTC

[jira] [Commented] (ARROW-7395) [C++] Logical "or" with constants is a Clang warning

    [ https://issues.apache.org/jira/browse/ARROW-7395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16997603#comment-16997603 ] 

Wes McKinney commented on ARROW-7395:
-------------------------------------

{{-Werror}} should probably not be applied to header files in the vendored directory, I don't know if there's a way that we can have this directory passed with {{-isystem}} to avoid this. 

> [C++] Logical "or" with constants is a Clang warning
> ----------------------------------------------------
>
>                 Key: ARROW-7395
>                 URL: https://issues.apache.org/jira/browse/ARROW-7395
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: C++
>    Affects Versions: 0.15.0
>            Reporter: Jim Apple
>            Assignee: Jim Apple
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> With clang version 9.0.1, the C++ debug build fails with:
> {noformat}
> 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) {
>           ^~
>           |
> {noformat}
> The simple fix is to add {{-Wno-constant-logical-operand}} to SetupCxxFlags.cmake.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)