From eeaba75a62be53ea3f723ba66ee1c37f57b53715 Mon Sep 17 00:00:00 2001 From: Omar Polo Date: Wed, 28 Oct 2020 20:02:57 +0100 Subject: [PATCH 1/2] use the correct format control for uint64_t --- src/picom.c | 2 +- src/win.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/picom.c b/src/picom.c index 48e7913..4caa1d4 100644 --- a/src/picom.c +++ b/src/picom.c @@ -101,7 +101,7 @@ const char *const BACKEND_STRS[] = {[BKEND_XRENDER] = "xrender", session_t *ps_g = NULL; void set_root_flags(session_t *ps, uint64_t flags) { - log_debug("Setting root flags: %lu", flags); + log_debug("Setting root flags: %" PRIu64, flags); ps->root_flags |= flags; ps->pending_updates = true; } diff --git a/src/win.c b/src/win.c index 7c82ab5..7ff73c6 100644 --- a/src/win.c +++ b/src/win.c @@ -4,6 +4,7 @@ #include #include +#include #include #include #include @@ -2515,7 +2516,7 @@ win_is_fullscreen_xcb(xcb_connection_t *c, const struct atom *a, const xcb_windo /// Set flags on a window. Some sanity checks are performed void win_set_flags(struct managed_win *w, uint64_t flags) { - log_debug("Set flags %lu to window %#010x (%s)", flags, w->base.id, w->name); + log_debug("Set flags %" PRIu64 " to window %#010x (%s)", flags, w->base.id, w->name); if (unlikely(w->state == WSTATE_DESTROYING)) { log_error("Flags set on a destroyed window %#010x (%s)", w->base.id, w->name); return; @@ -2526,7 +2527,8 @@ void win_set_flags(struct managed_win *w, uint64_t flags) { /// Clear flags on a window. Some sanity checks are performed void win_clear_flags(struct managed_win *w, uint64_t flags) { - log_debug("Clear flags %lu from window %#010x (%s)", flags, w->base.id, w->name); + log_debug("Clear flags %" PRIu64 " from window %#010x (%s)", flags, w->base.id, + w->name); if (unlikely(w->state == WSTATE_DESTROYING)) { log_warn("Flags cleared on a destroyed window %#010x (%s)", w->base.id, w->name); From 7eddf79ed205cad8a1e52ca09c0e957b3622b3ee Mon Sep 17 00:00:00 2001 From: Omar Polo Date: Wed, 28 Oct 2020 20:27:01 +0100 Subject: [PATCH 2/2] wrap subobject initialization with braces to silence a warning --- src/win.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/win.c b/src/win.c index 7ff73c6..d32ec97 100644 --- a/src/win.c +++ b/src/win.c @@ -240,7 +240,7 @@ void win_get_region_frame_local(const struct managed_win *w, region_t *res) { // limit the frame region to inside the window region_t reg_win; - pixman_region32_init_rects(®_win, (rect_t[]){0, 0, outer_width, outer_height}, 1); + pixman_region32_init_rects(®_win, (rect_t[]){{0, 0, outer_width, outer_height}}, 1); pixman_region32_intersect(res, ®_win, res); pixman_region32_fini(®_win); }