From d7dfbd23faf0b72a58da58f060a98e9b0023256b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20G=C3=BCnther?= Date: Fri, 26 Jan 2018 20:59:47 +0100 Subject: [PATCH] drm: Use ptrdiff_t instead of intmax_t in format string since we're looking at pointer differences. Otherwise the build fails on arm like In file included from ../backend/drm/drm.c:19:0: ../include/wlr/util/log.h:34:17: error: format '%jd' expects argument of type 'intmax_t', but argument 7 has type 'int' [-Werror=format=] _wlr_log(verb, "[%s:%d] " fmt, _strip_path(__FILE__), __LINE__, ##__VA_ARGS__) ^ ../backend/drm/drm.c:462:2: note: in expansion of macro 'wlr_log' wlr_log(L_DEBUG, "%s: crtc=%ju ovr=%jd pri=%jd cur=%jd", conn->output.name, ^~~~~~~ ../backend/drm/drm.c:462:39: note: format string is defined here wlr_log(L_DEBUG, "%s: crtc=%ju ovr=%jd pri=%jd cur=%jd", conn->output.name, ~~^ %d --- backend/drm/drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/drm/drm.c b/backend/drm/drm.c index 47bd4e3a..63a6e2da 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -459,7 +459,7 @@ static bool wlr_drm_connector_set_mode(struct wlr_output *output, if (!crtc) { return false; } - wlr_log(L_DEBUG, "%s: crtc=%ju ovr=%jd pri=%jd cur=%jd", conn->output.name, + wlr_log(L_DEBUG, "%s: crtc=%td ovr=%td pri=%td cur=%td", conn->output.name, crtc - drm->crtcs, crtc->overlay ? crtc->overlay - drm->overlay_planes : -1, crtc->primary ? crtc->primary - drm->primary_planes : -1,