Skip to content

Commit 173f00b

Browse files
authored
fix: emulator: fix MSVC compilation error due to storing a int64_t in a size_t.
The compiler spits out an error in pedantic mode because on 32 bit platforms, there is a usually the possibility of an overflow. However, the quantity is guaranteed to be 32 bit (https://github.com/googleapis/googleapis/blob/74657e8a6690b249c048f685124ee3b8473b70b4/google/bigtable/v2/data.proto#L497) so use int32_t to store it and fix the MSVC compiler warning and failure.
1 parent c10571b commit 173f00b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

google/cloud/bigtable/emulator/filter.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,7 @@ StatusOr<CellStreamConstructor> CreateFilterImpl(
919919
return res;
920920
}
921921
if (filter.has_cells_per_column_limit_filter()) {
922-
std::int64_t cells_per_column_limit =
922+
std::int32_t cells_per_column_limit =
923923
filter.cells_per_column_limit_filter();
924924
if (cells_per_column_limit < 0) {
925925
return InvalidArgumentError(

0 commit comments

Comments
 (0)