Cleanup: fix logger warnings introduced by SDL 3 migration

- logger.c:103 log_write_raw() missing return in unreachable
  assert(0) branch; clang flagged the missing return statement.
- logger.c:191 SDL_GetTicks() now returns Uint64 in SDL 3; widen the
  printf format from %d to %llu and bump the local buffer size.

Build is clean. Remaining warnings (strncat-size in a_wave.c,
invalid-source-encoding in a_midifile.c) are pre-2007 code-style
issues unrelated to SDL.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Ville Lindholm 2026-05-28 22:05:20 +03:00
parent 0e6865c4da
commit acb3925bb4
No known key found for this signature in database
GPG Key ID: 89AE9EAA3B6FDE7C

View File

@ -100,6 +100,7 @@ static inline int log_write_raw(int target, const char *text)
/* We should never get here. */
assert(0);
}
return 0;
}
@ -187,8 +188,9 @@ static inline void put_timestamp(int level)
{
if(l_targets[l_levels[level].target].flags & LOG_TIMESTAMP)
{
char buf[16];
snprintf(buf, sizeof(buf)-1, "[%d] ", SDL_GetTicks() - start_time);
char buf[24];
snprintf(buf, sizeof(buf)-1, "[%llu] ",
(unsigned long long)(SDL_GetTicks() - start_time));
log_write_raw(l_levels[level].target, buf);
}
}