Skip to content

Commit 608c594

Browse files
committed
fix warinings
Signed-off-by: Alexander Krimm <[email protected]>
1 parent 7efc9fa commit 608c594

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

src/client/include/CmwLightClient.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,6 @@ class CMWLightClient : public CMWLightClientBase {
478478
output.protocolName = "RDA3"; /// std::string < unique protocol name including version (e.g. 'MDPC03' or 'MDPW03')
479479
output.serviceName = "/"; /// std::string < service endpoint name (normally the URI path only), or client source ID (for broker <-> worker messages)
480480
output.clientRequestID = IoBuffer{}; /// IoBuffer < stateful: worker mirrors clientRequestID; stateless: worker generates unique increasing IDs (to detect packet loss)
481-
output.clientRequestID; /// IoBuffer < stateful: worker mirrors clientRequestID; stateless: worker generates unique increasing IDs (to detect packet loss)
482481
output.topic = URI{ "/" }; /// URI < URI containing at least <path> and optionally <query> parameters
483482
output.data = IoBuffer{ con._frames[2].data().data(), con._frames[2].size() }; /// IoBuffer < request/reply body -- opaque binary, e.g. YaS-, CmwLight-, JSON-, or HTML-based
484483
output.error = ""; /// std::string < UTF-8 strings containing error code and/or stack-trace (e.g. "404 Not Found")

src/client/test/CmwLightTest.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,16 @@ static std::string hexview(const std::string_view value, std::size_t bytesPerLin
3333
std::string alpha; // temporarily store the ascii representation
3434
alpha.reserve(8 * bytesPerLine);
3535
for (auto [i, c] : std::ranges::views::enumerate(value)) {
36-
if (i % (bytesPerLine * 8) == 0) {
36+
if (static_cast<std::size_t>(i) % (bytesPerLine * 8) == 0) {
3737
result.append(fmt::format("{0:#08x} - {0:04} | ", i)); // print address in hex and decimal
3838
}
3939
result.append(fmt::format("{:02x} ", c));
4040
alpha.append(fmt::format("{}", std::isprint(c) ? c : '.'));
41-
if ((i + 1) % 8 == 0) {
41+
if (static_cast<std::size_t>(i + 1) % 8 == 0) {
4242
result.append(" ");
4343
alpha.append(" ");
4444
}
45-
if ((i + 1) % (bytesPerLine * 8) == 0) {
45+
if (static_cast<std::size_t>(i + 1) % (bytesPerLine * 8) == 0) {
4646
result.append(fmt::format(" {}\n", alpha));
4747
alpha.clear();
4848
}

src/serialiser/include/IoSerialiserCmwLight.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ struct IoSerialiser<CmwLight, START_MARKER> {
242242
}
243243

244244
constexpr static void deserialise(IoBuffer &buffer, FieldDescription auto &field, const START_MARKER &) {
245-
field.subfields = buffer.get<int32_t>();
245+
field.subfields = static_cast<uint16_t>(buffer.get<int32_t>());
246246
field.dataStartPosition = buffer.position();
247247
}
248248
};

0 commit comments

Comments
 (0)