pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:334:    SIMPLE_TOO_FEW_ARGS_ERROR("7.0::hash",1);    if(TYPEOF(Pike_sp[-args]) != T_STRING)    SIMPLE_BAD_ARG_ERROR("7.0::hash", 1, "string");       if( s->size_shift )    {    f_hash_7_4( args );    return;    }    -  i = DO_NOT_WARN((unsigned int)hashstr( (unsigned char *)s->str, -  MINIMUM(100,s->len))); +  i = (unsigned int)hashstr( (unsigned char *)s->str, +  MINIMUM(100,s->len));    if(args > 1)    {    if(TYPEOF(Pike_sp[1-args]) != T_INT)    SIMPLE_BAD_ARG_ERROR("7.0::hash",2,"int");       if(!Pike_sp[1-args].u.integer)    PIKE_ERROR("7.0::hash", "Modulo by zero.\n", Pike_sp, args);       i%=(unsigned INT32)Pike_sp[1-args].u.integer;    }
pike.git/src/builtin_functions.c:824:    get_all_args("random_string",args,"%+",&len);    ret = begin_shared_string(len);       /* Note: Assumes pike_string->str is aligned on a 4 byte boundary    * (it is, currently)    */    str = (unsigned INT64 *)ret->str;       while( (e+=sizeof(INT64)) <= len )    { -  str[0] = DO_NOT_WARN(my_rand64()); +  str[0] = my_rand64();    str++;    }       for(e-=sizeof(INT64);e<len;e++)    { -  ret->str[e] = DO_NOT_WARN((char)my_rand()); +  ret->str[e] = (char)my_rand();    }       pop_n_elems(args);    push_string(end_shared_string(ret));   }      /*! @decl void random_seed(int seed)    *!    *! This function sets the initial value for the random generator.    *!
pike.git/src/builtin_functions.c:2208:    } else if (!(c & ~0x7fffffff)) {    /* 31bit */    out->str[j++] = 0xfc | (c >> 30);    out->str[j++] = 0x80 | ((c >> 24) & 0x3f);    out->str[j++] = 0x80 | ((c >> 18) & 0x3f);    out->str[j++] = 0x80 | ((c >> 12) & 0x3f);    out->str[j++] = 0x80 | ((c >> 6) & 0x3f);    out->str[j++] = 0x80 | (c & 0x3f);    } else {    /* 32 - 36bit */ -  out->str[j++] = DO_NOT_WARN((char)0xfe); +  out->str[j++] = (char)0xfe;    out->str[j++] = 0x80 | ((c >> 30) & 0x3f);    out->str[j++] = 0x80 | ((c >> 24) & 0x3f);    out->str[j++] = 0x80 | ((c >> 18) & 0x3f);    out->str[j++] = 0x80 | ((c >> 12) & 0x3f);    out->str[j++] = 0x80 | ((c >> 6) & 0x3f);    out->str[j++] = 0x80 | (c & 0x3f);    }    }   #ifdef PIKE_DEBUG    if (len != j) {
pike.git/src/builtin_functions.c:3360:    goto qjump;       case T_ARRAY:    size=Pike_sp[-args].u.array->size;       qjump:    a=allocate_array_no_init(size,0);    while(--size>=0)    {    /* Elements are already integers. */ -  ITEM(a)[size].u.integer = DO_NOT_WARN((INT_TYPE)size); +  ITEM(a)[size].u.integer = (INT_TYPE)size;    }    a->type_field = BIT_INT;    break;       case T_MAPPING:    a=mapping_indices(Pike_sp[-args].u.mapping);    break;       case T_MULTISET:    a = multiset_indices (Pike_sp[-args].u.multiset);
pike.git/src/builtin_functions.c:4136:    match_len = v[c].ind->len;    }    }    return match;   }         static int replace_sortfun(struct replace_many_tupel *a,    struct replace_many_tupel *b)   { -  return DO_NOT_WARN((int)my_quick_strcmp(a->ind, b->ind)); +  return (int)my_quick_strcmp(a->ind, b->ind);   }      void free_replace_many_context(struct replace_many_context *ctx)   {    if (ctx->v) {    if (ctx->flags) {    /* Used for the precompiled case. */    int e = ctx->num;    while (e--) {    free_string(ctx->v[e].ind);
pike.git/src/builtin_functions.c:7396: Inside #if defined(DEBUG_MALLOC)
      COUNT(memory_map);    COUNT(memory_map_entry);    COUNT(memloc);    COUNT(memhdr);    }   #endif       call_callback(&memory_usage_callback, NULL);    -  f_aggregate_mapping(DO_NOT_WARN(Pike_sp - ss)); +  f_aggregate_mapping(Pike_sp - ss);   }      /* Estimate the size of an svalue, not including objects.    this is used from size_object.       It should not include the size of the svalue itself, so the basic    types count as 0 bytes.       This is an estimate mainly because it is very hard to know to whom    a certain array/mapping/multiset or string "belongs".