From f47fc15265f9864eececcde85d0b246bac240aa3 Mon Sep 17 00:00:00 2001 From: Raul Metsma Date: Tue, 4 Feb 2025 22:23:02 +0200 Subject: [PATCH] Fix coverity warnings Signed-off-by: Raul Metsma --- lib/libpcsc-cpp/include/pcsc-cpp/pcsc-cpp.hpp | 2 +- lib/libpcsc-cpp/src/utils.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libpcsc-cpp/include/pcsc-cpp/pcsc-cpp.hpp b/lib/libpcsc-cpp/include/pcsc-cpp/pcsc-cpp.hpp index 0e226ce..bc4dcde 100644 --- a/lib/libpcsc-cpp/include/pcsc-cpp/pcsc-cpp.hpp +++ b/lib/libpcsc-cpp/include/pcsc-cpp/pcsc-cpp.hpp @@ -131,7 +131,7 @@ struct ResponseApdu friend std::string operator+(std::string&& lhs, const ResponseApdu& rhs) { - return lhs + rhs.data + byte_vector {rhs.sw1, rhs.sw2}; + return std::move(lhs) + rhs.data + byte_vector {rhs.sw1, rhs.sw2}; } }; diff --git a/lib/libpcsc-cpp/src/utils.cpp b/lib/libpcsc-cpp/src/utils.cpp index 82703e5..fcb8c40 100644 --- a/lib/libpcsc-cpp/src/utils.cpp +++ b/lib/libpcsc-cpp/src/utils.cpp @@ -74,7 +74,7 @@ std::ostream& operator<<(std::ostream& os, const pcsc_cpp::byte_vector& data) os << std::setfill('0') << std::hex; for (const auto byte : data) os << std::setw(2) << short(byte); - return os; + return os << std::setfill(' ') << std::dec; } std::string operator+(std::string lhs, const byte_vector& rhs)