Branch: Tag:

2018-02-25

2018-02-25 05:56:53 by Martin Nilsson <nilsson@fastmail.com>

Remove base_sp argument from bad_arg_error

1021:      /* coverity[+kill] */   PMOD_EXPORT DECLSPEC(noreturn) void bad_arg_error( -  const char *func, -  const struct svalue *base_sp, int args, +  const char *func, int args,    int which_argument,    const char *expected_type,    struct svalue *got_value,    const char *desc, ...) ATTRIBUTE((noreturn))   { -  +  const struct svalue *base_sp = args>=0 ? Pike_sp-args : NULL;    INIT_ERROR(bad_argument); -  if(!base_sp) base_sp = Pike_sp-args; +     ERROR_COPY(bad_argument, which_argument);    if (expected_type)    ERROR_STRUCT(bad_argument,o)->expected_type =
1089:   {    if(expected>args)    { -  bad_arg_error (name, NULL, args, expected, NULL, NULL, +  bad_arg_error (name, args, expected, NULL, NULL,    "Too few arguments to %s(). Expected at least %d (got %d).\n",    name, expected, args);    }else { -  bad_arg_error (name, NULL, args, expected, NULL, NULL, +  bad_arg_error (name, args, expected, NULL, NULL,    "Too many arguments to %s(). Expected at most %d (got %d).\n",    name, expected, args);    }