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

[C++] Resolve compile warnings on Apple Clang 12

    XMLWordPrintableJSON

Details

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

    Description

      ../src/arrow/util/uri.cc:172:19: error: loop variable 'seg' of type 'const nonstd::sv_lite::basic_string_view<char, std::__1::char_traits<char> >' creates a copy from type 'const nonstd::sv_lite::basic_string_view<char, std::__1::char_traits<char> >' [-Werror,-Wrange-loop-analysis]
        for (const auto seg : segments) {
                        ^
      ../src/arrow/util/uri.cc:172:8: note: use reference type 'const nonstd::sv_lite::basic_string_view<char, std::__1::char_traits<char> > &' to prevent copying
        for (const auto seg : segments) {
             ^~~~~~~~~~~~~~~~
                        & 
      ../src/arrow/ipc/metadata_internal.cc:1157:20: error: loop variable 'pair' is always a copy because the range of type 'const arrow::ipc::internal::KVVector' (aka 'const Vector<Offset<flatbuf::KeyValue> >') does not return a reference [-Werror,-Wrange-loo
      p-analysis]
        for (const auto& pair : *fb_metadata) {
                         ^
      ../src/arrow/ipc/metadata_internal.cc:1157:8: note: use non-reference type 'const org::apache::arrow::flatbuf::KeyValue *'
        for (const auto& pair : *fb_metadata) {
             ^~~~~~~~~~~~~~~~~~
      

      Attachments

        Issue Links

          Activity

            People

              kszucs Krisztian Szucs
              kszucs Krisztian Szucs
              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 - 1h
                  1h