pike.git / src / encode.c

version» Context lines:

pike.git/src/encode.c:271:    num -= (((INT64)256) << (t<<3));    else    break;    }       tag |= t << SIZE_SHIFT;    addchar((char)tag);       switch(t)    { -  case 3: addchar(DO_NOT_WARN((char)((num >> 24)&0xff))); -  case 2: addchar(DO_NOT_WARN((char)((num >> 16)&0xff))); -  case 1: addchar(DO_NOT_WARN((char)((num >> 8)&0xff))); -  case 0: addchar(DO_NOT_WARN((char)(num&0xff))); +  case 3: addchar((char)((num >> 24)&0xff)); +  case 2: addchar((char)((num >> 16)&0xff)); +  case 1: addchar((char)((num >> 8)&0xff)); +  case 0: addchar((char)(num&0xff));    }   }      static void code_number(ptrdiff_t num, struct encode_data *data)   {    EDB(5, fprintf(stderr, "%*scode_number(%d)\n",    data->depth, "", num)); -  code_entry(DO_NOT_WARN(num & 15), -  num >> 4, data); +  code_entry(num & 15, num >> 4, data);   }      /* NOTE: Take care to encode it exactly as the corresponing    * type string would have been encoded (cf T_FUNCTION, T_MANY,    * T_STRING, PIKE_T_NSTRING).    */   static void encode_type(struct pike_type *t, struct encode_data *data)   {    one_more_type:    if (t->type == T_MANY) {
pike.git/src/encode.c:706:    if(d == 0.0)    {    code_entry(TAG_FLOAT,0,data);    code_entry(TAG_FLOAT,0,data);    }else{    INT64 x;    int y;    double tmp;       tmp = frexp(d, &y); -  x = DO_NOT_WARN((INT64)((((INT64)1)<<(sizeof(INT64)*8 - 2))*tmp)); +  x = (INT64)((((INT64)1)<<(sizeof(INT64)*8 - 2))*tmp);    y -= sizeof(INT64)*8 - 2;       EDB(2,fprintf(stderr,    "Encoding float... tmp: %10g, x: 0x%016llx, y: %d\n",    tmp, x, y));       x >>= 32;    y += 32;       EDB(2,fprintf(stderr,
pike.git/src/encode.c:2548:       if(!res)    {    DECLARE_INF    DECLARE_NAN       switch(num)    {    case Pike_FP_SNAN: /* Signal Not A Number */    case Pike_FP_QNAN: /* Quiet Not A Number */ -  push_float(DO_NOT_WARN((FLOAT_TYPE)MAKE_NAN())); +  push_float((FLOAT_TYPE)MAKE_NAN());    break;       case Pike_FP_NINF: /* Negative infinity */ -  push_float(DO_NOT_WARN((FLOAT_TYPE)MAKE_INF(-1))); +  push_float((FLOAT_TYPE)MAKE_INF(-1));    break;       case Pike_FP_PINF: /* Positive infinity */ -  push_float(DO_NOT_WARN((FLOAT_TYPE)MAKE_INF(1))); +  push_float((FLOAT_TYPE)MAKE_INF(1));    break;       case Pike_FP_NZERO: /* Negative Zero */    push_float(-0.0); /* Does this do what we want? */    break;       default: -  push_float(DO_NOT_WARN((FLOAT_TYPE)ldexp(res, num))); +  push_float((FLOAT_TYPE)ldexp(res, num));    break;    }    break;    }    -  push_float(DO_NOT_WARN((FLOAT_TYPE)ldexp(res, num))); +  push_float((FLOAT_TYPE)ldexp(res, num));    break;    }       case TAG_TYPE:    {    struct pike_type *t;       decode_type(t, data);    push_type_value(t);   
pike.git/src/encode.c:4273:      static void rec_restore_value(char **v, ptrdiff_t *l)   {    ptrdiff_t t, i;       i = extract_int(v,l);    t = extract_int(v,l);    switch(i)    {    case TAG_INT: -  push_int(DO_NOT_WARN(t)); +  push_int(t);    return;       case TAG_FLOAT:    if(sizeof(ptrdiff_t) < sizeof(FLOAT_TYPE)) /* FIXME FIXME FIXME FIXME */    decode_error(current_decode, NULL, "Float architecture not supported.\n"); -  push_int(DO_NOT_WARN(t)); /* WARNING! */ +  push_int(t);    SET_SVAL_TYPE(Pike_sp[-1], T_FLOAT);    return;       case TAG_TYPE:    {    decode_error(current_decode, NULL, "TAG_TYPE not supported yet.\n");    }    return;       case TAG_STRING:
pike.git/src/encode.c:4303:    push_string(make_shared_binary_string(*v, t));    (*l)-= t;    (*v)+= t;    return;       case TAG_ARRAY:    if(t<0) decode_error(current_decode, NULL,    "length of array is negative.\n");    check_stack(t);    for(i=0;i<t;i++) rec_restore_value(v,l); -  f_aggregate(DO_NOT_WARN(t)); /* FIXME: Unbounded stack consumption. */ +  f_aggregate(t); /* FIXME: Unbounded stack consumption. */    return;       case TAG_MULTISET:    if(t<0) decode_error(current_decode, NULL,    "length of multiset is negative.\n");    check_stack(t);    for(i=0;i<t;i++) rec_restore_value(v,l); -  f_aggregate_multiset(DO_NOT_WARN(t)); /* FIXME: Unbounded stack consumption. */ +  f_aggregate_multiset(t); /* FIXME: Unbounded stack consumption. */    return;       case TAG_MAPPING:    if(t<0) decode_error(current_decode, NULL,    "length of mapping is negative.\n");    check_stack(t*2);    for(i=0;i<t;i++)    {    rec_restore_value(v,l);    rec_restore_value(v,l);    } -  f_aggregate_mapping(DO_NOT_WARN(t*2)); /* FIXME: Unbounded stack consumption. */ +  f_aggregate_mapping(t*2); /* FIXME: Unbounded stack consumption. */    return;       case TAG_OBJECT:    if(t<0) decode_error(current_decode, NULL,    "length of object is negative.\n");    if(*l < t) decode_error(current_decode, NULL, "string too short\n");    push_string(make_shared_binary_string(*v, t));    (*l) -= t; (*v) += t;    APPLY_MASTER("objectof", 1);    return;