Skip to content

Commit

Permalink
address compilation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
vicentebolea committed Mar 14, 2024
1 parent d38b962 commit f996b35
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 3 additions & 1 deletion scripts/ci/setup-run/ci-Windows.sh
Original file line number Diff line number Diff line change
@@ -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
11 changes: 6 additions & 5 deletions source/adios2/operator/compress/CompressBlosc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<int32_t>(helper::GetDataTypeSize(type));
if (typesize > BLOSC_MAX_TYPESIZE)
typesize = 1;

Expand All @@ -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<int16_t>(threads));
blosc1_set_blocksize(blockSize);

uint32_t chunk = 0;
Expand Down Expand Up @@ -327,7 +327,7 @@ size_t CompressBlosc::DecompressChunkedFormat(const char *bufferIn, const size_t
helper::StringTo<int32_t>(value, "when setting Blosc nthreads parameter\n"));
}
}
blosc2_set_nthreads(threads);
blosc2_set_nthreads(static_cast<int16_t>(threads));

while (inputOffset < inputDataSize)
{
Expand Down Expand Up @@ -398,8 +398,9 @@ size_t CompressBlosc::DecompressOldFormat(const char *bufferIn, const size_t siz
helper::StringTo<int32_t>(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<int16_t>(threads));
const int decompressedSize = blosc2_decompress(bufferIn, static_cast<int32_t>(sizeIn), dataOut,
static_cast<int32_t>(sizeOut));
blosc2_destroy();
return static_cast<size_t>(decompressedSize);
}
Expand Down

0 comments on commit f996b35

Please sign in to comment.