pike.git / src / error.c

version» Context lines:

pike.git/src/error.c:14:   #include "array.h"   #include "object.h"   #include "main.h"   #include "builtin_functions.h"   #include "backend.h"   #include "operators.h"   #include "module_support.h"   #include "threads.h"   #include "gc.h"    - RCSID("$Id: error.c,v 1.59 2000/08/15 11:42:44 grubba Exp $"); + RCSID("$Id: error.c,v 1.60 2000/08/15 16:11:36 grubba Exp $");      #undef ATTRIBUTE   #define ATTRIBUTE(X)      /*    * Backtrace handling.    */      struct pike_backtrace   {
pike.git/src/error.c:218:    */      JMP_BUF *recoveries=0;      #ifdef PIKE_DEBUG   PMOD_EXPORT void check_recovery_context(void)   {    char foo;   #define TESTILITEST ((((char *)Pike_interpreter.recoveries)-((char *)&foo))*STACK_DIRECTION)    if(Pike_interpreter.recoveries && TESTILITEST > 0) { -  fprintf(stderr, "Recoveries is out biking (Pike_interpreter.recoveries=%p, Pike_sp=%p, %d)!\n", -  Pike_interpreter.recoveries, &foo, TESTILITEST); +  fprintf(stderr, "Recoveries is out biking (Pike_interpreter.recoveries=%p, Pike_sp=%p, %ld)!\n", +  Pike_interpreter.recoveries, &foo, +  DO_NOT_WARN((long)TESTILITEST));    fprintf(stderr, "Last recovery was added at %s:%d\n",    Pike_interpreter.recoveries->file,    Pike_interpreter.recoveries->line);    fatal("Recoveries is out biking (Pike_interpreter.recoveries=%p, Pike_sp=%p, %d)!\n", -  Pike_interpreter.recoveries, &foo, TESTILITEST); +  Pike_interpreter.recoveries, &foo, +  DO_NOT_WARN((long)TESTILITEST));    }       /* Add more stuff here when required */   }      PMOD_EXPORT void pike_gdb_breakpoint(void)   {   }   #endif   
pike.git/src/error.c:349:    if(!Pike_interpreter.recoveries)    {   #ifdef PIKE_DEBUG    dump_backlog();   #endif       fprintf(stderr,"No error recovery context!\n%s",buf);    exit(99);    }    -  if((long)strlen(buf) >= (long)sizeof(buf)) +  if((size_t)strlen(buf) >= (size_t)sizeof(buf))    fatal("Buffer overflow in error()\n");       low_error(buf);   }      PMOD_EXPORT void new_error(const char *name, const char *text, struct svalue *oldsp,    INT32 args, const char *file, int line) ATTRIBUTE((noreturn))   {    int i;   
pike.git/src/error.c:731:   }      PMOD_EXPORT void resource_error(    char *func,    struct svalue *base_sp, int args,    char *resource_type,    size_t howmuch,    char *desc, ...) ATTRIBUTE((noreturn,format (printf, 6, 7)))   {    INIT_ERROR(resource); -  ERROR_COPY(resource,howmuch); +  ERROR_COPY(resource, DO_NOT_WARN((INT32)howmuch));    ERROR_STRUCT(resource,o)->resource_type=make_shared_string(resource_type);    ERROR_DONE(generic);   }      PMOD_EXPORT void permission_error(    char *func,    struct svalue *base_sp, int args,    char *permission_type,    char *desc, ...) ATTRIBUTE((noreturn, format(printf, 5, 6)))   {