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

[C++] Suppress sign-compare warning with g++ 9.2.1

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.15.0
    • C++

    Description

          ../src/arrow/array/builder_union.cc: In constructor 'arrow::BasicUnionBuilder::BasicUnionBuilder(arrow::MemoryPool*, arrow::UnionMode::type, const std::vector<std::shared_ptr<arrow::ArrayBuilder> >&, const std::shared_ptr<arrow::DataType>&)':
          ../src/arrow/util/logging.h:86:55: error: comparison of integer expressions of different signedness: 'std::vector<std::shared_ptr<arrow::ArrayBuilder> >::size_type' {aka 'long unsigned int'} and 'signed char' [-Werror=sign-compare]
             86 | #define ARROW_CHECK_LT(val1, val2) ARROW_CHECK((val1) < (val2))
                |                                                ~~~~~~~^~~~~~~~
          ../src/arrow/util/macros.h:43:52: note: in definition of macro 'ARROW_PREDICT_TRUE'
             43 | #define ARROW_PREDICT_TRUE(x) (__builtin_expect(!!(x), 1))
                |                                                    ^
          ../src/arrow/util/logging.h:86:36: note: in expansion of macro 'ARROW_CHECK'
             86 | #define ARROW_CHECK_LT(val1, val2) ARROW_CHECK((val1) < (val2))
                |                                    ^~~~~~~~~~~
          ../src/arrow/util/logging.h:135:19: note: in expansion of macro 'ARROW_CHECK_LT'
            135 | #define DCHECK_LT ARROW_CHECK_LT
                |                   ^~~~~~~~~~~~~~
          ../src/arrow/array/builder_union.cc:79:3: note: in expansion of macro 'DCHECK_LT'
             79 |   DCHECK_LT(type_id_to_children_.size(), std::numeric_limits<int8_t>::max());
                |   ^~~~~~~~~
      

      Attachments

        Issue Links

          Activity

            People

              kou Kouhei Sutou
              kou Kouhei Sutou
              Votes:
              0 Vote for this issue
              Watchers:
              2 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 - 1h
                  1h