Branch: Tag:

2000-02-03

2000-02-03 19:09:13 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Fixed lots of warnings.

Rev: src/builtin_functions.c:1.235
Rev: src/cpp.c:1.59
Rev: src/dynamic_load.c:1.37
Rev: src/las.c:1.160
Rev: src/lexer.h:1.15
Rev: src/modules/Image/colors.c:1.30
Rev: src/modules/Image/default_font.c:1.2
Rev: src/modules/Image/encodings/avs.c:1.8
Rev: src/modules/Image/encodings/iff.c:1.4
Rev: src/modules/Image/encodings/ilbm.c:1.13
Rev: src/modules/Image/encodings/pcx.c:1.9
Rev: src/modules/Image/encodings/psd.c:1.14
Rev: src/modules/Image/encodings/ras.c:1.5
Rev: src/modules/Image/encodings/tga.c:1.9
Rev: src/modules/Image/encodings/wbf.c:1.4
Rev: src/modules/Image/encodings/xcf.c:1.12
Rev: src/modules/Image/image.c:1.158
Rev: src/modules/Image/layers.c:1.41
Rev: src/modules/_Charset/charsetmod.c:1.18
Rev: src/modules/_Crypto/rsa.c:1.10
Rev: src/modules/files/file.h:1.15
Rev: src/modules/files/file_functions.h:1.15
Rev: src/modules/files/socket.c:1.47
Rev: src/modules/spider/xml.c:1.16
Rev: src/operators.c:1.85
Rev: src/pike_memory.c:1.52
Rev: src/pike_types.c:1.121
Rev: src/preprocessor.h:1.17
Rev: src/stralloc.c:1.78
Rev: src/svalue.c:1.62

1:   #include "global.h" - RCSID("$Id: xcf.c,v 1.11 1999/08/16 18:10:23 grubba Exp $"); + RCSID("$Id: xcf.c,v 1.12 2000/02/03 19:01:29 grubba Exp $");      #include "image_machine.h"   
36:   #define TILE_WIDTH 64   #define TILE_HEIGHT 64    - #define STRING(X) static struct pike_string *s_##X; + #define STRING(X) static struct pike_string *s_##X   #include "xcf_constant_strings.h"   #undef STRING   
164:    char *res;    if( from->len < len )    error("Not enough space for %ud bytes\n", len); -  res = from->str; +  res = (char *)from->str;    from->str += len;    from->len -= len;    return res;
174:   {    struct buffer res;    res.len = read_int( data ); -  res.str = read_data( data, res.len ); +  res.str = (unsigned char *)read_data( data, res.len );    if(res.len > 0) res.len--; /* len includes ending \0 */    if(!res.str)    error("String read failed\n");
192:    read_uint(data); /* bogus 'len'... */    foo = read_uint( data );    res.data.len = foo*3; -  res.data.str = read_data( data,foo*3 ); +  res.data.str = (unsigned char *)read_data( data,foo*3 );    } else {    res.data.len = read_uint( data ); -  res.data.str = read_data( data,res.data.len ); +  res.data.str = (unsigned char *)read_data( data,res.data.len );    }    res.next = NULL;    return res;
561:    data->str[3] == 'p' &&    data->str[4] == ' '))    { -  if(strlen(data->str) == 13) +  if(strlen((char *)data->str) == 13)    error("This is not an xcf file (%s)\n", data->str);    else    error("This is not an xcf file\n");
621:      static void push_buffer( struct buffer *b )   { -  push_string( make_shared_binary_string( b->str, b->len ) ); +  push_string( make_shared_binary_string( (char *)b->str, b->len ) );   }      static void push_properties( struct property *p )
756:    if(args > 1)    error("Too many arguments to Image.XCF.___decode()\n");    -  b.str = s->str; b.len = s->len; +  b.str = (unsigned char *)s->str; b.len = s->len;    res = read_image( &b );    SET_ONERROR( err, free_image, &res );    push_image( &res );
789:    get_all_args( "_rle_decode", args, "%S%d%d%d", &t, &bpp, &xsize, &ysize);       s.len = t->len; -  s.str = t->str; -  od.len = xsize*ysize*bpp; -  od.str = xalloc( xsize*ysize*bpp ); /* Max and only size, really */ +  s.str = (unsigned char *)t->str; +  od.len = xsize*ysize*bpp; /* Max and only size, really */ +  od.str = (unsigned char *)xalloc( xsize*ysize*bpp );    d = od;    for(i=0; i<bpp; i++)    {
841:    /* fprintf(stderr, "%d bytes of source data used out of %d bytes\n" */    /* "%d bytes decoded data generated\n", */    /* t->len-s.len,t->len,od.len); */ -  push_string(make_shared_binary_string(od.str,od.len)); +  push_string(make_shared_binary_string((char *)od.str,od.len));    free(od.str);   }   
1157:    error("Too small tile, was %d bytes, I really need %d\n",    tile->len, eheight*ewidth * bpp);    -  s = tile->str; +  s = (unsigned char *)tile->str;       check_signals(); /* Allow ^C */   
1308:    add_integer_constant( "INDEXED_GIMAGE", INDEXED_GIMAGE, 0 );    add_integer_constant( "INDEXEDA_GIMAGE", INDEXEDA_GIMAGE, 0 );    - #define STRING(X) s_##X = make_shared_binary_string(#X,sizeof( #X )-sizeof("")); + #define STRING(X) s_##X = make_shared_binary_string(#X,sizeof( #X )-sizeof(""))   #include "xcf_constant_strings.h"   #undef STRING   }