Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C++] g++ (GCC) 14.2.1 20240910 fails to compile due to -Werror=conversion #3166

Merged
merged 3 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lang/c++/impl/DataFile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ void DataFileWriterBase::sync() {
crc.process_bytes(reinterpret_cast<const char *>(temp.data()),
temp.size());
// For Snappy, add the CRC32 checksum
int32_t checksum = crc();
auto checksum = crc();

// Now compress
size_t compressed_size = snappy::Compress(
Expand Down Expand Up @@ -408,7 +408,7 @@ void DataFileReaderBase::readDataBlock() {
"Snappy Compression reported an error when decompressing");
}
crc.process_bytes(uncompressed.c_str(), uncompressed.size());
uint32_t c = crc();
auto c = crc();
if (checksum != c) {
throw Exception(
"Checksum did not match for Snappy compression: Expected: {}, computed: {}",
Expand Down
1 change: 1 addition & 0 deletions lang/c++/impl/Node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* limitations under the License.
*/

#include <algorithm>
#include <cmath>
#include <unordered_set>

Expand Down
1 change: 1 addition & 0 deletions lang/c++/impl/parsing/Symbol.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#ifndef avro_parsing_Symbol_hh__
#define avro_parsing_Symbol_hh__

#include <algorithm>
#include <map>
#include <set>
#include <sstream>
Expand Down