mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-29 23:45:51 +00:00
Fix clang warnings
This commit is contained in:
committed by
Vinnie Falco
parent
8eddcfd3d5
commit
bb02112752
@@ -343,9 +343,9 @@ public:
|
||||
const beast_wchar c = src.getAndAdvance();
|
||||
const size_t bytesNeeded = DestCharPointerType::getBytesRequiredFor (c);
|
||||
|
||||
maxBytes -= bytesNeeded;
|
||||
if (c == 0 || maxBytes < 0)
|
||||
if (c == 0 || maxBytes < bytesNeeded)
|
||||
break;
|
||||
maxBytes -= bytesNeeded;
|
||||
|
||||
dest.write (c);
|
||||
}
|
||||
|
||||
@@ -64,6 +64,9 @@ public:
|
||||
#pragma warning (push)
|
||||
#pragma warning (disable: 4127) // conditional expression is constant
|
||||
#pragma warning (disable: 4146) // unary minus operator applied to unsigned type, result still unsigned
|
||||
#elif defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wtautological-compare"
|
||||
#endif
|
||||
// pass in a pointer to the END of a buffer..
|
||||
template <typename IntegerType>
|
||||
@@ -86,6 +89,8 @@ public:
|
||||
}
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning (pop)
|
||||
#elif defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
struct StackArrayStream : public std::basic_streambuf <char, std::char_traits <char> >
|
||||
|
||||
Reference in New Issue
Block a user