GithubHelp home page GithubHelp logo

Comments (2)

Algunenano avatar Algunenano commented on August 25, 2024

In case it's helpful, it also reproduces in this ClickHouse's PR:

May 13 22:40:20 /build/contrib/abseil-cpp/absl/container/internal/raw_hash_set.h:562:44: error: The value '0' provided to the cast expression is not in the valid range of values for 'ctrl_t' [clang-analyzer-optin.core.EnumCastOutOfRange,-warnings-as-errors]
May 13 22:40:20   562 | inline bool IsFull(ctrl_t c) { return c >= static_cast<ctrl_t>(0); }
May 13 22:40:20       |                                            ^
May 13 22:40:20 /build/contrib/abseil-cpp/absl/container/internal/raw_hash_set.h:484:12: note: enum declared here
May 13 22:40:20   484 | enum class ctrl_t : int8_t {
May 13 22:40:20       | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~
May 13 22:40:20   485 |   kEmpty = -128,   // 0b10000000
May 13 22:40:20       |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
May 13 22:40:20   486 |   kDeleted = -2,   // 0b11111110
May 13 22:40:20       |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
May 13 22:40:20   487 |   kSentinel = -1,  // 0b11111111
May 13 22:40:20       |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
May 13 22:40:20   488 | };
May 13 22:40:20       | ~
May 13 22:40:20 /build/src/Interpreters/ActionsDAG.cpp:2750:9: note: Assuming the condition is false
May 13 22:40:20  2750 |     if (sort_description.empty())
May 13 22:40:20       |         ^~~~~~~~~~~~~~~~~~~~~~~~
May 13 22:40:20 /build/src/Interpreters/ActionsDAG.cpp:2750:5: note: Taking false branch
May 13 22:40:20  2750 |     if (sort_description.empty())
May 13 22:40:20       |     ^
May 13 22:40:20 /build/src/Interpreters/ActionsDAG.cpp:2753:9: note: Assuming the condition is false
May 13 22:40:20  2753 |     if (hasArrayJoin())
May 13 22:40:20       |         ^~~~~~~~~~~~~~
May 13 22:40:20 /build/src/Interpreters/ActionsDAG.cpp:2753:5: note: Taking false branch
May 13 22:40:20  2753 |     if (hasArrayJoin())
May 13 22:40:20       |     ^
May 13 22:40:20 /build/src/Interpreters/ActionsDAG.cpp:2756:35: note: Calling 'ActionsDAG::updateHeader'
May 13 22:40:20  2756 |     const Block & output_header = updateHeader(input_header);
May 13 22:40:20       |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
May 13 22:40:20 /build/src/Interpreters/ActionsDAG.cpp:724:42: note: Assuming 'pos' is equal to 0
May 13 22:40:20   724 |         for (size_t pos = inputs.size(); pos != 0; pos--)
May 13 22:40:20       |                                          ^~~~~~~~
May 13 22:40:20 /build/src/Interpreters/ActionsDAG.cpp:724:9: note: Loop condition is false. Execution continues on line 727
May 13 22:40:20   724 |         for (size_t pos = inputs.size(); pos != 0; pos--)
May 13 22:40:20       |         ^
May 13 22:40:20 /build/src/Interpreters/ActionsDAG.cpp:727:30: note: Assuming the condition is true
May 13 22:40:20   727 |         for (size_t pos = 0; pos < header.columns(); ++pos)
May 13 22:40:20       |                              ^~~~~~~~~~~~~~~~~~~~~~
May 13 22:40:20 /build/src/Interpreters/ActionsDAG.cpp:727:9: note: Loop condition is true.  Entering loop body
May 13 22:40:20   727 |         for (size_t pos = 0; pos < header.columns(); ++pos)
May 13 22:40:20       |         ^
May 13 22:40:20 /build/src/Interpreters/ActionsDAG.cpp:731:17: note: Calling 'operator!='
May 13 22:40:20   731 |             if (it != input_positions.end() && !it->second.empty())
May 13 22:40:20       |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
May 13 22:40:20 /build/contrib/abseil-cpp/absl/container/internal/raw_hash_set.h:1718:16: note: Calling 'operator=='
May 13 22:40:20  1718 |       return !(a == b);
May 13 22:40:20       |                ^~~~~~
May 13 22:40:20 /build/contrib/abseil-cpp/absl/container/internal/raw_hash_set.h:1711:7: note: Calling 'AssertIsValidForComparison'
May 13 22:40:20  1711 |       AssertIsValidForComparison(a.ctrl_, a.generation(), a.generation_ptr());
May 13 22:40:20       |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
May 13 22:40:20 /build/contrib/abseil-cpp/absl/container/internal/raw_hash_set.h:1263:3: note: Taking false branch
May 13 22:40:20  1263 |   if (!SwisstableDebugEnabled()) return;
May 13 22:40:20       |   ^
May 13 22:40:20 /build/contrib/abseil-cpp/absl/container/internal/raw_hash_set.h:1265:7: note: Assuming the condition is false
May 13 22:40:20  1265 |       ctrl == nullptr || ctrl == EmptyGroup() || IsFull(*ctrl);
May 13 22:40:20       |       ^~~~~~~~~~~~~~~
May 13 22:40:20 /build/contrib/abseil-cpp/absl/container/internal/raw_hash_set.h:1265:7: note: Left side of '||' is false
May 13 22:40:20 /build/contrib/abseil-cpp/absl/container/internal/raw_hash_set.h:1265:26: note: Assuming the condition is false
May 13 22:40:20  1265 |       ctrl == nullptr || ctrl == EmptyGroup() || IsFull(*ctrl);
May 13 22:40:20       |                          ^~~~~~~~~~~~~~~~~~~~
May 13 22:40:20 /build/contrib/abseil-cpp/absl/container/internal/raw_hash_set.h:1265:7: note: Left side of '||' is false
May 13 22:40:20  1265 |       ctrl == nullptr || ctrl == EmptyGroup() || IsFull(*ctrl);
May 13 22:40:20       |       ^
May 13 22:40:20 /build/contrib/abseil-cpp/absl/container/internal/raw_hash_set.h:1265:50: note: Calling 'IsFull'
May 13 22:40:20  1265 |       ctrl == nullptr || ctrl == EmptyGroup() || IsFull(*ctrl);
May 13 22:40:20       |                                                  ^~~~~~~~~~~~~
May 13 22:40:20 /build/contrib/abseil-cpp/absl/container/internal/raw_hash_set.h:562:44: note: The value '0' provided to the cast expression is not in the valid range of values for 'ctrl_t'
May 13 22:40:20   562 | inline bool IsFull(ctrl_t c) { return c >= static_cast<ctrl_t>(0); }
May 13 22:40:20       |                                            ^~~~~~~~~~~~~~~~~~~~~~
May 13 22:40:20 45528 warnings generated.
May 13 22:40:20 Suppressed 46304 warnings (45527 in non-user code, 777 NOLINT).
May 13 22:40:20 Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
May 13 22:40:20 1 warning treated as error

from abseil-cpp.

MarkusPister avatar MarkusPister commented on August 25, 2024

Got fixed by commit 1a31b81.

from abseil-cpp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.