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:
parent
d2a7875b5b
commit
412cc96bc9
7 changed files with 12 additions and 19 deletions
|
@ -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]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue