diff options
Diffstat (limited to 'options/m_option.c')
-rw-r--r-- | options/m_option.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/options/m_option.c b/options/m_option.c index 162d57ee8e..0ec85825b6 100644 --- a/options/m_option.c +++ b/options/m_option.c @@ -1159,8 +1159,6 @@ static int str_list_del(struct mp_log *log, char **del, int n, void *dst) talloc_free(lst[idx]); lst[idx] = NULL; s--; - if (i > 0) - mp_warn(log, "Passing multiple -del arguments is deprecated!\n"); } talloc_free(del); @@ -1282,6 +1280,11 @@ static int parse_str_list_impl(struct mp_log *log, const m_option_t *opt, res[n] = NULL; talloc_free(ptr); + if (op != OP_NONE && n > 1) { + mp_warn(log, "Passing multiple arguments to %.*s is deprecated!\n", + BSTR_P(name)); + } + switch (op) { case OP_ADD: return str_list_add(res, n, dst, 0); @@ -2976,6 +2979,11 @@ static int parse_obj_settings_list(struct mp_log *log, const m_option_t *opt, } } + if (op != OP_NONE && res && res[0].name && res[1].name) { + mp_warn(log, "Passing more than 1 argument to %.*s is deprecated!\n", + BSTR_P(name)); + } + if (dst) { m_obj_settings_t *list = VAL(dst); if (op == OP_PRE) { |