Branch: Tag:

2000-08-10

2000-08-10 09:20:00 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Fixed a few warnings.

Rev: src/block_alloc.h:1.22
Rev: src/cpp.c:1.73
Rev: src/cyclic.c:1.5
Rev: src/docode.c:1.77
Rev: src/dynamic_buffer.c:1.12
Rev: src/dynamic_load.c:1.42
Rev: src/encode.c:1.63
Rev: src/fsort_template.h:1.8
Rev: src/pike_macros.h:1.19
Rev: src/stuff.c:1.12
Rev: src/stuff.h:1.8

5:   \*/      /* -  * $Id: stuff.c,v 1.11 2000/07/28 17:16:55 hubbe Exp $ +  * $Id: stuff.c,v 1.12 2000/08/10 09:20:00 grubba Exp $    */   #include "global.h"   #include "stuff.h"
51:   /* same thing as (int)floor(log((double)x) / log(2.0)) */   /* Except a bit quicker :) (hopefully) */    - PMOD_EXPORT int my_log2(unsigned INT32 x) + PMOD_EXPORT int my_log2(size_t x)   {    static signed char bit[256] =    {
72:    7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,    7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,    }; -  register unsigned int tmp; +  register size_t tmp; + #if SIZEOF_CHAR_P > 4 +  if((tmp=(x>>32))) +  { +  if((x=(tmp>>16))) { +  if((tmp=(x>>8))) return bit[tmp]+56; +  return bit[x]+48; +  } +  if((x=(tmp>>8))) return bit[x]+40; +  return bit[tmp]+32; +  } + #endif /* SIZEOF_CHAP_P > 4 */    if((tmp=(x>>16)))    {    if((x=(tmp>>8))) return bit[x]+24;