Fix segfaults on 32bit arch with --log-level=debug

There were a few improper uses of %ld for 64 bit numbers, as well as
some other 32 bit related warnings that I've fixed.

Signed-off-by: ktprograms <ktprograms@gmail.com>
This commit is contained in:
ktprograms
2021-11-25 16:21:41 +08:00
committed by yshui
parent 1c7a4ff5a3
commit 4dfb979c52
7 changed files with 13 additions and 13 deletions

View File

@@ -243,7 +243,7 @@ static double fade_timeout(session_t *ps) {
* @param steps steps of fading
* @return whether we are still in fading mode
*/
static bool run_fade(session_t *ps, struct managed_win **_w, long steps) {
static bool run_fade(session_t *ps, struct managed_win **_w, long long steps) {
auto w = *_w;
if (w->state == WSTATE_MAPPED || w->state == WSTATE_UNMAPPED) {
// We are not fading
@@ -635,7 +635,7 @@ static struct managed_win *paint_preprocess(session_t *ps, bool *fade_running) {
*fade_running = false;
// Fading step calculation
long steps = 0L;
long long steps = 0L;
auto now = get_time_ms();
if (ps->fade_time) {
assert(now >= ps->fade_time);