mirror of https://github.com/mpv-player/mpv
common/msg: fix warning: void function should not return void expression
This commit is contained in:
parent
98ab8d87a1
commit
18bd03d31a
11
common/msg.c
11
common/msg.c
|
@ -299,15 +299,18 @@ bool mp_msg_has_status_line(struct mpv_global *global)
|
||||||
|
|
||||||
static void set_term_color(void *talloc_ctx, bstr *text, int c)
|
static void set_term_color(void *talloc_ctx, bstr *text, int c)
|
||||||
{
|
{
|
||||||
return c == -1 ? bstr_xappend(talloc_ctx, text, bstr0("\033[0m"))
|
if (c == -1) {
|
||||||
: bstr_xappend_asprintf(talloc_ctx, text,
|
bstr_xappend(talloc_ctx, text, bstr0("\033[0m"));
|
||||||
"\033[%d;3%dm", c >> 3, c & 7);
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
bstr_xappend_asprintf(talloc_ctx, text, "\033[%d;3%dm", c >> 3, c & 7);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void set_msg_color(void *talloc_ctx, bstr *text, int lev)
|
static void set_msg_color(void *talloc_ctx, bstr *text, int lev)
|
||||||
{
|
{
|
||||||
static const int v_colors[] = {9, 1, 3, -1, -1, 2, 8, 8, 8, -1};
|
static const int v_colors[] = {9, 1, 3, -1, -1, 2, 8, 8, 8, -1};
|
||||||
return set_term_color(talloc_ctx, text, v_colors[lev]);
|
set_term_color(talloc_ctx, text, v_colors[lev]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pretty_print_module(struct mp_log_root *root, bstr *text,
|
static void pretty_print_module(struct mp_log_root *root, bstr *text,
|
||||||
|
|
Loading…
Reference in New Issue