From 887c0185249b21a4ebec326491b31c3160968201 Mon Sep 17 00:00:00 2001 From: Quentin Glidic Date: Sun, 10 Jul 2016 11:00:53 +0200 Subject: [PATCH] libweston: Silence tautological-compare warning libweston/compositor.c:5023:14: warning: comparison of unsigned enum expression < 0 is always false [-Wtautological-compare] if (backend < 0 || backend >= ARRAY_LENGTH(backend_map)) ~~~~~~~ ^ ~ Warning produced by Clang 3.8. Signed-off-by: Quentin Glidic Reviewed-by: Giulio Camuffo --- libweston/compositor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libweston/compositor.c b/libweston/compositor.c index 24cfcfa1..47907bb8 100644 --- a/libweston/compositor.c +++ b/libweston/compositor.c @@ -5093,7 +5093,7 @@ weston_compositor_load_backend(struct weston_compositor *compositor, int (*backend_init)(struct weston_compositor *c, struct weston_backend_config *config_base); - if (backend < 0 || backend >= ARRAY_LENGTH(backend_map)) + if (backend >= ARRAY_LENGTH(backend_map)) return -1; backend_init = weston_load_module(backend_map[backend], "backend_init");