1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-02 16:38:41 +00:00

Fix some compiler warnings (#15596)

This commit is contained in:
Lars Müller 2024-12-26 11:29:00 +01:00 committed by GitHub
parent d2a7875b5b
commit 412cc96bc9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 12 additions and 19 deletions

View file

@ -160,11 +160,12 @@ void Printer::print(const c8 *message, ELOG_LEVEL ll)
// Android logcat restricts log-output and cuts the rest of the message away. But we want it all.
// On my device max-len is 1023 (+ 0 byte). Some websites claim a limit of 4096 so maybe different numbers on different devices.
const size_t maxLogLen = 1023;
constexpr size_t maxLogLen = 1023;
size_t msgLen = strlen(message);
size_t start = 0;
while (msgLen - start > maxLogLen) {
__android_log_print(LogLevel, "Irrlicht", "%.*s\n", maxLogLen, &message[start]);
__android_log_print(LogLevel, "Irrlicht", "%.*s\n",
static_cast<int>(maxLogLen), &message[start]);
start += maxLogLen;
}
__android_log_print(LogLevel, "Irrlicht", "%s\n", &message[start]);