build: silence sign promotion warnings
This commit is contained in:
parent
5da7b87c4a
commit
5a7ff4d20a
@ -14,12 +14,14 @@ using namespace std;
|
|||||||
debug::backtrace::backtrace (void):
|
debug::backtrace::backtrace (void):
|
||||||
m_frames (DEFAULT_DEPTH) {
|
m_frames (DEFAULT_DEPTH) {
|
||||||
|
|
||||||
int final;
|
size_t last;
|
||||||
while ((final = ::backtrace (&m_frames[0], m_frames.size ())) == sign_cast<ssize_t> (m_frames.size ()))
|
size_t size = m_frames.size ();
|
||||||
m_frames.resize (m_frames.size () * 2);
|
|
||||||
|
|
||||||
CHECK_HARD (final > 0);
|
while ((last = ::backtrace (&m_frames[0], m_frames.size ())) == size)
|
||||||
m_frames.resize ((unsigned)final);
|
m_frames.resize (size = m_frames.size () * 2);
|
||||||
|
|
||||||
|
CHECK_HARD (last > 0);
|
||||||
|
m_frames.resize (last);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ bsdsum (const void *restrict _data, size_t size) {
|
|||||||
uint16_t accum = 0;
|
uint16_t accum = 0;
|
||||||
|
|
||||||
for (size_t i = 0; i < size; ++i) {
|
for (size_t i = 0; i < size; ++i) {
|
||||||
accum = (accum >> 1) | ((accum & 0x1) << 15);
|
accum = (accum >> 1u) | ((accum & 0x01u) << 15u);
|
||||||
accum += data[i];
|
accum += data[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user