From f1fc10a488453f1682f001cda748d5cd004ba8f3 Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Mon, 6 Aug 2012 14:57:06 +0300 Subject: [PATCH] compositor: fix weston_log format warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit compositor.c: In function ‘log_extensions’: compositor.c:3085:7: warning: field precision should have type ‘int’, but argument 2 has type ‘long int’ compositor.c:3087:4: warning: field precision should have type ‘int’, but argument 2 has type ‘long int’ Signed-off-by: Pekka Paalanen --- src/compositor.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/compositor.c b/src/compositor.c index 3765bec0..12fc157a 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -3075,16 +3075,18 @@ log_extensions(const char *name, const char *extensions) { const char *p, *end; int l; + int len; l = weston_log("%s:", name); p = extensions; while (*p) { end = strchrnul(p, ' '); - if (l + (end - p) > 78) + len = end - p; + if (l + len > 78) l = weston_log_continue("\n" STAMP_SPACE "%.*s", - end - p, p); + len, p); else - l += weston_log_continue(" %.*s", end - p, p); + l += weston_log_continue(" %.*s", len, p); for (p = end; isspace(*p); p++) ; }