From f996b359cb389eed6f0e946de21c1cb190d2f25f Mon Sep 17 00:00:00 2001 From: Vicente Adolfo Bolea Sanchez Date: Thu, 14 Mar 2024 19:30:58 -0400 Subject: [PATCH] address compilation warnings --- scripts/ci/setup-run/ci-Windows.sh | 4 +++- source/adios2/operator/compress/CompressBlosc.cpp | 11 ++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/scripts/ci/setup-run/ci-Windows.sh b/scripts/ci/setup-run/ci-Windows.sh index 891feea290..590fd50def 100755 --- a/scripts/ci/setup-run/ci-Windows.sh +++ b/scripts/ci/setup-run/ci-Windows.sh @@ -1,5 +1,7 @@ #!/bin/bash C:/Miniconda/condabin/conda.bat activate base -ls C:/Miniconda/Library + +# This is needed for findLZ4.cmake (called from Blosc2) to find LZ4 libraries +# (non-cmake). export CMAKE_INCLUDE_PATH=C:/Miniconda/Library/include export CMAKE_LIBRARY_PATH=C:/Miniconda/Library/lib diff --git a/source/adios2/operator/compress/CompressBlosc.cpp b/source/adios2/operator/compress/CompressBlosc.cpp index c4bb6d53ae..97c51f0109 100644 --- a/source/adios2/operator/compress/CompressBlosc.cpp +++ b/source/adios2/operator/compress/CompressBlosc.cpp @@ -145,7 +145,7 @@ size_t CompressBlosc::Operate(const char *dataIn, const Dims &blockStart, const *headerPtr = DataHeader{}; bufferOutOffset += sizeof(DataHeader); - int32_t typesize = helper::GetDataTypeSize(type); + int32_t typesize = static_cast(helper::GetDataTypeSize(type)); if (typesize > BLOSC_MAX_TYPESIZE) typesize = 1; @@ -166,7 +166,7 @@ size_t CompressBlosc::Operate(const char *dataIn, const Dims &blockStart, const "Operator", "CompressBlosc", "Operate", "blosc library linked does not support compressor " + compressor); } - blosc2_set_nthreads(threads); + blosc2_set_nthreads(static_cast(threads)); blosc1_set_blocksize(blockSize); uint32_t chunk = 0; @@ -327,7 +327,7 @@ size_t CompressBlosc::DecompressChunkedFormat(const char *bufferIn, const size_t helper::StringTo(value, "when setting Blosc nthreads parameter\n")); } } - blosc2_set_nthreads(threads); + blosc2_set_nthreads(static_cast(threads)); while (inputOffset < inputDataSize) { @@ -398,8 +398,9 @@ size_t CompressBlosc::DecompressOldFormat(const char *bufferIn, const size_t siz helper::StringTo(value, "when setting Blosc nthreads parameter\n")); } } - blosc2_set_nthreads(threads); - const int decompressedSize = blosc2_decompress(bufferIn, sizeIn, dataOut, sizeOut); + blosc2_set_nthreads(static_cast(threads)); + const int decompressedSize = blosc2_decompress(bufferIn, static_cast(sizeIn), dataOut, + static_cast(sizeOut)); blosc2_destroy(); return static_cast(decompressedSize); }