Gang Wu created ORC-2159:
----------------------------

             Summary: [C++] C++ build fails with newer protobuf due to ignored 
nodiscard return values
                 Key: ORC-2159
                 URL: https://issues.apache.org/jira/browse/ORC-2159
             Project: ORC
          Issue Type: Improvement
          Components: C++
            Reporter: Gang Wu
            Assignee: Gang Wu


The C++ build fails with newer protobuf / compiler headers because several 
boolean-returning APIs are marked nodiscard and their return values are 
ignored. Since the C++ build treats warnings as errors, these become hard build 
failures.


The build fails with errors like:

  ColumnReader.cc:438:9: error: ignoring return value of function declared with 
'nodiscard' attribute [-Werror,-Wunused-result]
    inputStream_->Skip(static_cast<int>(step));

  ColumnReader.cc:684:9: error: ignoring return value of function declared with 
'nodiscard' attribute [-Werror,-Wunused-result]
    blobStream_->Skip(static_cast<int>(step));

  ColumnWriter.cc:215:5: error: ignoring return value of function declared with 
'nodiscard' attribute [-Werror,-Wunused-result]
    rowIndex->SerializeToZeroCopyStream(indexStream.get());



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to