quirks: explicitly cast the log priority

The values are the same and this is ABI so they will never change. Make the
cast explicit for coverity's benefit.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2018-06-18 13:27:57 +10:00
parent 653beca662
commit 8aef361062
2 changed files with 5 additions and 4 deletions

View file

@ -185,8 +185,6 @@ quirk_log_msg_va(struct quirks_context *ctx,
const char *format,
va_list args)
{
enum libinput_log_priority p = priority;
switch (priority) {
/* We don't use this if we're logging through libinput */
default:
@ -201,7 +199,10 @@ quirk_log_msg_va(struct quirks_context *ctx,
break;
}
ctx->log_handler(ctx->libinput, p, format, args);
ctx->log_handler(ctx->libinput,
(enum libinput_log_priority)priority,
format,
args);
}
LIBINPUT_ATTRIBUTE_PRINTF(3, 4)

View file

@ -41,7 +41,7 @@ log_handler(struct libinput *this_is_null,
va_list args)
{
FILE *out = stdout;
enum quirks_log_priorities p = priority;
enum quirks_log_priorities p = (enum quirks_log_priorities)priority;
char buf[256] = {0};
const char *prefix = "";