diff --git a/cpp/src/parquet/metadata.cc b/cpp/src/parquet/metadata.cc index 70c785b7359..cecfc515dd4 100644 --- a/cpp/src/parquet/metadata.cc +++ b/cpp/src/parquet/metadata.cc @@ -1753,7 +1753,7 @@ class ColumnChunkMetaDataBuilder::ColumnChunkMetaDataBuilderImpl { eck.__set_path_in_schema(column_->path()->ToDotVector()); // check if column has its own encryption algorithm if (encrypt_md->parquet_cipher().has_value()) { - EncryptionAlgorithm column_encryption_algorithm; + EncryptionAlgorithm column_encryption_algorithm{}; column_encryption_algorithm.algorithm = encrypt_md->parquet_cipher().value(); eck.__set_encryption_algorithm(ToThrift(column_encryption_algorithm)); } diff --git a/cpp/src/parquet/types.h b/cpp/src/parquet/types.h index f3b1b5d7f89..c71a06fc076 100644 --- a/cpp/src/parquet/types.h +++ b/cpp/src/parquet/types.h @@ -580,7 +580,7 @@ bool IsParquetCipherSupported(ParquetCipher::type cipher); struct AadMetadata { std::string aad_prefix; std::string aad_file_unique; - bool supply_aad_prefix; + bool supply_aad_prefix = false; }; struct EncryptionAlgorithm {