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 <sardemff7+git@sardemff7.net>
Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
dev
Quentin Glidic 8 years ago
parent 9ba1546172
commit 887c018524
No known key found for this signature in database
GPG Key ID: AC203F96E2C34BB7
  1. 2
      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");

Loading…
Cancel
Save