Branch: Tag:

2000-08-14

2000-08-14 17:18:06 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Fixed a few warnings.

Rev: bin/mkpeep.pike:1.18
Rev: src/peep.c:1.34
Rev: src/peep.h:1.6

15:   #include "bignum.h"   #include "opcodes.h"    - RCSID("$Id: peep.c,v 1.33 2000/05/11 14:09:46 grubba Exp $"); + RCSID("$Id: peep.c,v 1.34 2000/08/14 17:18:06 grubba Exp $");      struct p_instr_s   {
65:      void exit_bytecode(void)   { -  INT32 e,length; +  ptrdiff_t e, length;    p_instr *c;       c=(p_instr *)instrbuf.s.str;
76:    toss_buffer(&instrbuf);   }    - int insert_opcode2(unsigned int f, + ptrdiff_t insert_opcode2(unsigned int f,    INT32 b,    INT32 c,    INT32 current_line,
106:    return p - (p_instr *)instrbuf.s.str;   }    - int insert_opcode1(unsigned int f, + ptrdiff_t insert_opcode1(unsigned int f,    INT32 b,    INT32 current_line,    struct pike_string *current_file)
119:    return insert_opcode2(f,b,0,current_line,current_file);   }    - int insert_opcode0(int f,int current_line, struct pike_string *current_file) + ptrdiff_t insert_opcode0(int f,int current_line, struct pike_string *current_file)   {   #ifdef PIKE_DEBUG    if(hasarg(f))
221:      void assemble(void)   { -  INT32 e,d,length,max_label,tmp; +  INT32 d,max_label,tmp;    INT32 *labels, *jumps, *uses; -  +  ptrdiff_t e, length;    p_instr *c;       c=(p_instr *)instrbuf.s.str;
248:    c=(p_instr *)instrbuf.s.str;    for(e=0;e<length;e++)    if(c[e].opcode == F_LABEL && c[e].arg>=0) -  labels[c[e].arg]=e; +  labels[c[e].arg]=DO_NOT_WARN((INT32)e);       for(e=0;e<length;e++)    {
412:   /**** Peephole optimizer ****/      int remove_clear_locals=0x7fffffff; - static int fifo_len, eye,len; + static int fifo_len; + static ptrdiff_t eye, len;   static p_instr *instructions;    - int insopt2(int f, INT32 a, INT32 b, int cl, struct pike_string *cf) + ptrdiff_t insopt2(int f, INT32 a, INT32 b, int cl, struct pike_string *cf)   {    p_instr *p;   
446:    return p - (p_instr *)instrbuf.s.str;   }    - int insopt1(int f, INT32 a, int cl, struct pike_string *cf) + ptrdiff_t insopt1(int f, INT32 a, int cl, struct pike_string *cf)   {   #ifdef PIKE_DEBUG    if(!hasarg(f) && a)
456:    return insopt2(f,a,0,cl, cf);   }    - int insopt0(int f, int cl, struct pike_string *cf) + ptrdiff_t insopt0(int f, int cl, struct pike_string *cf)   {   #ifdef PIKE_DEBUG    if(hasarg(f))
654: Inside #if defined(PIKE_DEBUG)
   if(a_flag > 3)    {    p_instr *c; -  INT32 e,length; +  ptrdiff_t e, length; +     c=(p_instr *)instrbuf.s.str;    length=instrbuf.s.len / sizeof(p_instr);   
676: Inside #if defined(PIKE_DEBUG)
   if(a_flag > 4)    {    p_instr *c; -  INT32 e,length; +  ptrdiff_t e, length; +     c=(p_instr *)instrbuf.s.str;    length=instrbuf.s.len / sizeof(p_instr);