Skip to content

Commit

Permalink
Fix coverity warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Raul Metsma <raul@metsma.ee>
  • Loading branch information
metsma authored and mrts committed Feb 4, 2025
1 parent 054c7ef commit f47fc15
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/libpcsc-cpp/include/pcsc-cpp/pcsc-cpp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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};
}
};

Expand Down
2 changes: 1 addition & 1 deletion lib/libpcsc-cpp/src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f47fc15

Please # to comment.