diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/BStream.cc | 12 | ||||
-rw-r--r-- | src/Exceptions.cc | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/BStream.cc b/src/BStream.cc index 6c51c4f..16fd1d1 100644 --- a/src/BStream.cc +++ b/src/BStream.cc @@ -50,9 +50,9 @@ ssize_t Balau::BStream::read(void * _buf, size_t count) throw (Balau::GeneralExc return m_h->read(buf, count) + copied; m_cursor = 0; - IAssert(m_availBytes == 0, "At this point, our internal buffer should be empty, but it's not: %lu", m_availBytes); + IAssert(m_availBytes == 0, "At this point, our internal buffer should be empty, but it's not: %zu", m_availBytes); ssize_t r = m_h->read(m_buffer, s_blockSize); - EAssert(r >= 0, "BStream got an error while reading: %li", r); + EAssert(r >= 0, "BStream got an error while reading: %zu", r); m_availBytes = r; if (toCopy > m_availBytes) @@ -74,9 +74,9 @@ int Balau::BStream::peekNextByte() { ssize_t r = read(&b, 1); if (!r) return -1; - EAssert(r == 1, "We asked for one byte, yet we got %li", r); - IAssert(m_cursor > 0, "m_cursor is %li", m_cursor); - IAssert(m_availBytes < s_blockSize, "m_availBytes = %li; s_blockSize = %i", m_availBytes, s_blockSize); + EAssert(r == 1, "We asked for one byte, yet we got %zi", r); + IAssert(m_cursor > 0, "m_cursor is %zi", m_cursor); + IAssert(m_availBytes < s_blockSize, "m_availBytes = %zi; s_blockSize = %i", m_availBytes, s_blockSize); m_cursor--; m_availBytes++; } @@ -109,7 +109,7 @@ Balau::String Balau::BStream::readString(bool putNL) { if (isClosed() || isEOF()) return ret; peekNextByte(); - IAssert(m_cursor == 0, "m_cursor is %li", m_cursor); + IAssert(m_cursor == 0, "m_cursor is %zi", m_cursor); cr = (uint8_t *) memchr(m_buffer, '\r', m_availBytes); lf = (uint8_t *) memchr(m_buffer, '\n', m_availBytes); if (cr && lf) { diff --git a/src/Exceptions.cc b/src/Exceptions.cc index d7d360f..09d9d8e 100644 --- a/src/Exceptions.cc +++ b/src/Exceptions.cc @@ -52,7 +52,7 @@ void Balau::GeneralException::genTrace() { String line; for (int i = 0; i < n; i++) - line += String().set("%08lx ", (uintptr_t) trace[i]); + line += String().set("%08zx ", (uintptr_t) trace[i]); m_trace.push_back(line); Dl_info info; @@ -68,7 +68,7 @@ void Balau::GeneralException::genTrace() { } else { demangled = NULL; } - line.set("%i: %s(%s%c0x%lx) [0x%08lx]", i, info.dli_fname, info.dli_sname ? (demangled ? (status == 0 ? demangled : info.dli_sname) : info.dli_sname) : "??", dist < 0 ? '-' : '+', dist < 0 ? -dist : dist, (uintptr_t) trace[i]); + line.set("%i: %s(%s%c0x%lx) [0x%08zx]", i, info.dli_fname, info.dli_sname ? (demangled ? (status == 0 ? demangled : info.dli_sname) : info.dli_sname) : "??", dist < 0 ? '-' : '+', dist < 0 ? -dist : dist, (uintptr_t) trace[i]); m_trace.push_back(line); if (demangled) free(demangled); |