Skip to content

Commit

Permalink
fixup! Remove warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
vicentebolea committed Jun 10, 2021
1 parent e88d4f7 commit 6978299
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 2 deletions.
2 changes: 2 additions & 0 deletions source/adios2/toolkit/format/bp/BPSerializer.tcc
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ void BPSerializer::UpdateIndexOffsetsCharacteristics(size_t &currentPosition,
std::vector<char> &buffer)
{
const bool isLittleEndian = helper::IsLittleEndian();
const uint8_t characteristicsCount =
helper::ReadValue<uint8_t>(buffer, currentPosition, isLittleEndian);

const uint32_t characteristicsLength =
helper::ReadValue<uint32_t>(buffer, currentPosition, isLittleEndian);
Expand Down
14 changes: 13 additions & 1 deletion source/adios2/toolkit/format/bp/bp3/BP3Deserializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace format
std::mutex BP3Deserializer::m_Mutex;

BP3Deserializer::BP3Deserializer(helper::Comm const &comm)
: BPBase(comm), BP3Base(comm), m_Minifooter(3)
: BP3Base(comm), BPBase(comm), m_Minifooter(3)
{
}

Expand Down Expand Up @@ -139,6 +139,8 @@ void BP3Deserializer::ParsePGIndex(const BufferSTL &bufferSTL,

m_MetadataSet.DataPGCount = helper::ReadValue<uint64_t>(
buffer, position, m_Minifooter.IsLittleEndian);
const size_t length = helper::ReadValue<uint64_t>(
buffer, position, m_Minifooter.IsLittleEndian);

size_t localPosition = 0;

Expand Down Expand Up @@ -208,6 +210,11 @@ void BP3Deserializer::ParseVariablesIndex(const BufferSTL &bufferSTL,
m_Minifooter.VarsIndexStart, m_Minifooter.PGIndexStart,
" BP3 variable index start < pg index start, in call to Open");

const uint32_t count = helper::ReadValue<uint32_t>(
buffer, position, m_Minifooter.IsLittleEndian);
const uint64_t length = helper::ReadValue<uint64_t>(
buffer, position, m_Minifooter.IsLittleEndian);

const size_t startPosition = position;
size_t localPosition = 0;

Expand Down Expand Up @@ -312,6 +319,11 @@ void BP3Deserializer::ParseAttributesIndex(const BufferSTL &bufferSTL,
m_Minifooter.AttributesIndexStart, m_Minifooter.PGIndexStart,
" BP3 attributes index start < pg index start, in call to Open");

const uint32_t count = helper::ReadValue<uint32_t>(
buffer, position, m_Minifooter.IsLittleEndian);
const uint64_t length = helper::ReadValue<uint64_t>(
buffer, position, m_Minifooter.IsLittleEndian);

const size_t startPosition = position;
size_t localPosition = 0;

Expand Down
6 changes: 5 additions & 1 deletion source/adios2/toolkit/format/bp/bp4/BP4Deserializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ namespace format
std::mutex BP4Deserializer::m_Mutex;

BP4Deserializer::BP4Deserializer(helper::Comm const &comm)
: BPBase(comm), BP4Base(comm), m_Minifooter(4)
: BP4Base(comm), BPBase(comm), m_Minifooter(4)
{
}

Expand Down Expand Up @@ -335,6 +335,8 @@ void BP4Deserializer::ParseVariablesIndexPerStep(const BufferSTL &bufferSTL,
const auto &buffer = bufferSTL.m_Buffer;
size_t position = m_MetadataIndexTable[submetadatafileId][step][1];

const uint32_t count = helper::ReadValue<uint32_t>(
buffer, position, m_Minifooter.IsLittleEndian);
const uint64_t length = helper::ReadValue<uint64_t>(
buffer, position, m_Minifooter.IsLittleEndian);

Expand Down Expand Up @@ -526,6 +528,8 @@ void BP4Deserializer::ParseAttributesIndexPerStep(const BufferSTL &bufferSTL,
const auto &buffer = bufferSTL.m_Buffer;
size_t position = m_MetadataIndexTable[submetadatafileId][step][2];

const uint32_t count = helper::ReadValue<uint32_t>(
buffer, position, m_Minifooter.IsLittleEndian);
const uint64_t length = helper::ReadValue<uint64_t>(
buffer, position, m_Minifooter.IsLittleEndian);

Expand Down
4 changes: 4 additions & 0 deletions source/adios2/toolkit/format/bp/bp4/BP4Serializer.tcc
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,8 @@ void BP4Serializer::PutBoundsRecord(const bool singleValue,
static_cast<uint64_t>(stats.SubBlockInfo.SubBlockSize);
helper::InsertToBuffer(buffer, &subBlockSize);

const uint16_t N =
static_cast<uint16_t>(stats.SubBlockInfo.Div.size());
for (auto const d : stats.SubBlockInfo.Div)
{
helper::InsertToBuffer(buffer, &d);
Expand Down Expand Up @@ -676,6 +678,8 @@ void BP4Serializer::PutBoundsRecord(const bool singleValue,
static_cast<uint64_t>(stats.SubBlockInfo.SubBlockSize);
helper::CopyToBuffer(buffer, position, &subBlockSize);

const uint16_t N =
static_cast<uint16_t>(stats.SubBlockInfo.Div.size());
for (auto const d : stats.SubBlockInfo.Div)
{
helper::CopyToBuffer(buffer, position, &d);
Expand Down

0 comments on commit 6978299

Please sign in to comment.