From: Quentin Glidic <[email protected]> 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 <[email protected]> --- libweston/compositor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libweston/compositor.c b/libweston/compositor.c index 771f1c9..2da29ca 100644 --- a/libweston/compositor.c +++ b/libweston/compositor.c @@ -5020,7 +5020,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"); -- 2.9.0 _______________________________________________ wayland-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/wayland-devel
