pike.git / src / error.c

version» Context lines:

pike.git/src/error.c:1028:   /* coverity[+kill] */   PMOD_EXPORT DECLSPEC(noreturn) void bad_arg_error(    const char *func,    const struct svalue *base_sp, int args,    int which_argument,    const char *expected_type,    struct svalue *got_value,    const char *desc, ...) ATTRIBUTE((noreturn))   {    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 =    make_shared_string(expected_type);    else    ERROR_STRUCT(bad_argument,o)->expected_type = NULL;    ERROR_COPY_SVALUE(bad_argument, got_value);    DWERROR("%s():Bad arg %d (expected %s)\n",    func, which_argument, expected_type);    ERROR_DONE(generic);
pike.git/src/error.c:1100:    ERROR_STRUCT(permission,o)->permission_type=    make_shared_string(permission_type);    ERROR_DONE(generic);   }      /* coverity[+kill] */   PMOD_EXPORT void wrong_number_of_args_error(const char *name, int args, int expected)   {    if(expected>args)    { -  bad_arg_error (name, Pike_sp-args, args, expected, NULL, NULL, +  bad_arg_error (name, NULL, args, expected, NULL, NULL,    "Too few arguments to %s(). Expected at least %d (got %d).\n",    name, expected, args);    }else { -  bad_arg_error (name, Pike_sp-args, args, expected, NULL, NULL, +  bad_arg_error (name, NULL, args, expected, NULL, NULL,    "Too many arguments to %s(). Expected at most %d (got %d).\n",    name, expected, args);    }   }      #ifdef PIKE_DEBUG   static void gc_check_throw_value(struct callback *UNUSED(foo), void *UNUSED(bar), void *UNUSED(gazonk))   {    gc_mark_external_svalues(&throw_value,1," in the throw value");   }