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

@@ -44,7 +44,7 @@ region_t get_damage(session_t *ps, bool all_damage) {
} else {
for (int i = 0; i < buffer_age; i++) {
auto curr = ((ps->damage - ps->damage_ring) + i) % ps->ndamage;
log_trace("damage index: %d, damage ring offset: %ld", i, curr);
log_trace("damage index: %d, damage ring offset: %td", i, curr);
dump_region(&ps->damage_ring[curr]);
pixman_region32_union(&region, &region, &ps->damage_ring[curr]);
}

View File

@@ -92,7 +92,7 @@ make_shadow(xcb_connection_t *c, const conv *kernel, double opacity, int width,
}
unsigned char *data = ximage->data;
long sstride = ximage->stride;
long long sstride = ximage->stride;
// If the window body is smaller than the kernel, we do convolution directly
if (width < r * 2 && height < r * 2) {