From a46bea3854d781d6df880ea0feb8a5c25775acd4 Mon Sep 17 00:00:00 2001 From: SergeyRyabinin Date: Mon, 16 Oct 2023 19:11:08 +0000 Subject: [PATCH] #2711: add static cast --- .../source/client/RequestCompression.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/aws-cpp-sdk-core/source/client/RequestCompression.cpp b/src/aws-cpp-sdk-core/source/client/RequestCompression.cpp index e51a49049b7..2a93bc15428 100644 --- a/src/aws-cpp-sdk-core/source/client/RequestCompression.cpp +++ b/src/aws-cpp-sdk-core/source/client/RequestCompression.cpp @@ -136,7 +136,7 @@ iostream_outcome Aws::Client::RequestCompression::compress(std::shared_ptr= toRead); streamSize -= toRead; //left to read - strm.avail_in = (flush == Z_FINISH)?toRead-1:toRead; //skip EOF if included + strm.avail_in = static_cast((flush == Z_FINISH) ? toRead-1 : toRead); //skip EOF if included strm.next_in = in.get(); do { @@ -254,7 +255,7 @@ Aws::Client::RequestCompression::uncompress(std::shared_ptr input //Adding one to the stream size counter to account for the EOF marker. streamSize++; - size_t toRead; + size_t toRead = 0; // Decompress do { toRead = (streamSize < ZLIB_CHUNK)?streamSize:ZLIB_CHUNK; @@ -277,7 +278,7 @@ Aws::Client::RequestCompression::uncompress(std::shared_ptr input } // Filling input buffer to decompress - strm.avail_in = toRead; + strm.avail_in = static_cast(toRead); strm.next_in = in.get(); do {