diff options
author | wm4 <wm4@nowhere> | 2014-11-07 15:58:51 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-11-07 15:58:51 +0100 |
commit | 18ade94c893dd571d2b7765206f1e33f09cede50 (patch) | |
tree | 71d34b4a8252f010c3e5524bf299f8f75aec0ea5 | |
parent | b814b7ca84a85a6c17c4ab85ae9855afb62bc237 (diff) | |
download | mpv-18ade94c893dd571d2b7765206f1e33f09cede50.tar.bz2 mpv-18ade94c893dd571d2b7765206f1e33f09cede50.tar.xz |
client API: silence silly clang warning
The values compared here happen to be of unsigned enum types - but the
test is not supposed to break if we somehow force the enum to signed, or
if the compiler happens to use a signed type (as far as I remember, the
exact integer type the compiler can use is implementation-defined).
-rw-r--r-- | player/client.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/player/client.c b/player/client.c index 6a8204615f..6fc4546a06 100644 --- a/player/client.c +++ b/player/client.c @@ -707,7 +707,7 @@ static const struct m_option type_conv[] = { static const struct m_option *get_mp_type(mpv_format format) { - if (format < 0 || format >= MP_ARRAY_SIZE(type_conv)) + if ((unsigned)format >= MP_ARRAY_SIZE(type_conv)) return NULL; if (!type_conv[format].type) return NULL; @@ -1527,7 +1527,7 @@ static const char *const event_table[] = { const char *mpv_event_name(mpv_event_id event) { - if (event < 0 || event >= MP_ARRAY_SIZE(event_table)) + if ((unsigned)event >= MP_ARRAY_SIZE(event_table)) return NULL; return event_table[event]; } |