Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-3070

[Build] C++ lint is failing Github Actions

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • c++
    • None

    Description

      It looks like the ./build.sh lint command is failing on github actions. This works on my local build in the docker.

      There haven't been any changes to the c++ files since the last success, but I noticed that the github C compiler versions have bumped from 7.5.0 to 9.3.0.

      Run ./build.sh lint
      CMake Deprecation Warning at CMakeLists.txt:19 (cmake_minimum_required):
        Compatibility with CMake < 2.8.12 will be removed from a future version of
        CMake.
      
        Update the VERSION argument <min> value or use a ...<max> suffix to tell
        CMake that the project does not need compatibility with older versions.
      
      
      -- The C compiler identification is GNU 9.3.0
      -- The CXX compiler identification is GNU 9.3.0
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Check for working C compiler: /usr/bin/cc - skipped
      -- Detecting C compile features
      -- Detecting C compile features - done
      -- Detecting CXX compiler ABI info
      -- Detecting CXX compiler ABI info - done
      -- Check for working CXX compiler: /usr/bin/c++ - skipped
      -- Detecting CXX compile features
      -- Detecting CXX compile features - done
      -- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.38") found components: filesystem iostreams program_options regex system 
      Enabled snappy codec
      -- Found Snappy: /usr/lib/x86_64-linux-gnu/libsnappy.so  
      -- Configuring done
      -- Generating done
      -- Build files have been written to: /home/runner/work/avro/avro/lang/c++/build
      impl/json/JsonIO.hh:398:64: error: Using pointer to temporary. [danglingTemporaryLifetime]
              out_.writeBytes(reinterpret_cast<const uint8_t*>(s.data()), s.size());
                                                                     ^
      impl/json/JsonIO.hh:397:30: note: Assigned to reference.
              const std::string& s = oss.str();
                                   ^
      impl/json/JsonIO.hh:398:58: note: Pointer to container is created here.
              out_.writeBytes(reinterpret_cast<const uint8_t*>(s.data()), s.size());
                                                               ^
      impl/json/JsonIO.hh:398:64: note: Using pointer to temporary.
              out_.writeBytes(reinterpret_cast<const uint8_t*>(s.data()), s.size());
                                                                     ^
      impl/json/JsonIO.hh:415:64: error: Using pointer to temporary. [danglingTemporaryLifetime]
              out_.writeBytes(reinterpret_cast<const uint8_t*>(s.data()), s.size());
                                                                     ^
      impl/json/JsonIO.hh:414:30: note: Assigned to reference.
              const std::string& s = oss.str();
                                   ^
      impl/json/JsonIO.hh:415:58: note: Pointer to container is created here.
              out_.writeBytes(reinterpret_cast<const uint8_t*>(s.data()), s.size());
                                                               ^
      impl/json/JsonIO.hh:415:64: note: Using pointer to temporary.
              out_.writeBytes(reinterpret_cast<const uint8_t*>(s.data()), s.size());
                                                                     ^
      Error: Process completed with exit code 1.
      

      Attachments

        Activity

          People

            thiru_mg Thiruvalluvan M. G.
            rskraba Ryan Skraba
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: