pike.git / src / opcodes.c

version» Context lines:

pike.git/src/opcodes.c:19:   #include "pike_types.h"   #include "pike_memory.h"   #include "fd_control.h"   #include "cyclic.h"   #include "builtin_functions.h"   #include "module_support.h"   #include "security.h"   #include "bignum.h"   #include "operators.h"    - RCSID("$Id: opcodes.c,v 1.69 1999/12/10 22:41:09 grubba Exp $"); + RCSID("$Id: opcodes.c,v 1.70 1999/12/22 00:35:33 grubba Exp $");      void index_no_free(struct svalue *to,struct svalue *what,struct svalue *ind)   {    INT32 i;      #ifdef PIKE_SECURITY    if(what->type <= MAX_COMPLEX)    if(!CHECK_DATA_SECURITY(what->u.array, SECURITY_BIT_INDEX))    error("Index permission denied.\n");   #endif
pike.git/src/opcodes.c:685:    if(match[cnt]==']') \    { \    set->c['-']=1; \    break; \    } \    \    if(last >= match[cnt]) \    error("Error in sscanf format string.\n"); \    \   CHAROPT( \ -  if(last < sizeof(set->c)) \ +  if(last < (unsigned long)sizeof(set->c)) \    { \ -  if(match[cnt] < sizeof(set->c)) \ +  if(match[cnt] < (unsigned long)sizeof(set->c)) \    { \   ) \    for(e=last;e<=match[cnt];e++) set->c[e]=1; \   CHAROPT( \    }else{ \ -  for(e=last;e<sizeof(set->c);e++) set->c[e]=1; \ +  for(e=last;e<(unsigned long)sizeof(set->c);e++) \ +  set->c[e]=1; \    \    check_stack(2); \    push_int(256); \    push_int(match[cnt]); \    set_size++; \    } \    } \    else \    { \    sp[-1].u.integer=match[cnt]; \    } \   ) \    continue; \    } \    last=match[cnt]; \ -  if(last < sizeof(set->c)) \ +  if(last < (unsigned long)sizeof(set->c)) \    set->c[last]=1; \   CHAROPT( \    else{ \ -  if(set_size && sp[-1].u.integer == last-1) \ +  if(set_size && \ +  ((unsigned long)sp[-1].u.integer) == last-1) \    { \    sp[-1].u.integer++; \    }else{ \    check_stack(2); \    push_int(last); \    push_int(last); \    set_size++; \    } \    } \   ) \    } \    \   CHAROPT( \    if(set_size) \    { \    INT32 *order; \    set->a=aggregate_array(set_size*2); \    order=get_switch_order(set->a); \ -  for(e=0;e<set->a->size;e+=2) \ +  for(e=0;e<(unsigned long)set->a->size;e+=2) \    { \    if(order[e]+1 != order[e+1]) \    { \    free_array(set->a); \    set->a=0; \    free((char *)order); \    error("Overlapping ranges in sscanf not supported.\n"); \    } \    } \    \