Branch: Tag:

2003-09-10

2003-09-10 15:21:59 by Martin Stjernholm <mast@lysator.liu.se>

Fixed various warnings and potential bugs with types of different sizes.

Rev: src/encode.c:1.197
Rev: src/gc.c:1.232
Rev: src/modules/DVB/dvb.c:1.21
Rev: src/modules/Gz/zlibmod.c:1.65
Rev: src/modules/Image/colors.c:1.66
Rev: src/modules/Image/font.c:1.81
Rev: src/modules/Mysql/dummy.c:1.13
Rev: src/modules/Parser/html.c:1.167
Rev: src/modules/Postgres/postgres.c:1.32
Rev: src/modules/_Image_GIF/image_gif.c:1.16
Rev: src/modules/_Image_JPEG/image_jpeg.c:1.63
Rev: src/modules/system/system.c:1.155
Rev: src/post_modules/GTK/pgtk.h:1.31
Rev: src/post_modules/GTK/source/global.pre:1.31
Rev: src/post_modules/GTK/source/gnomeiconselection.pre:1.3
Rev: src/post_modules/GTK/source/gtkclist.pre:1.15
Rev: src/post_modules/GTK/source/support.c:1.37
Rev: src/post_modules/SDL/SDL.cmod:1.20
Rev: src/post_modules/Shuffler/e_source_block_pikestream.c:1.3
Rev: src/program.c:1.525

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: dvb.c,v 1.20 2003/05/12 20:21:33 mast Exp $ + || $Id: dvb.c,v 1.21 2003/09/10 15:21:58 mast Exp $   */      /*
180:      }    - dvb_stream_data *sl_getstream(dvb_data *parent, int pid) { + dvb_stream_data *sl_getstream(dvb_data *parent, unsigned int pid) {    dvb_stream_data *st = parent->stream;       if(st == NULL)
239:    Pike_error("Create already called!\n");       DVB->cardn = 0; -  if(args) +  if(args) {    if(Pike_sp[-1].type != T_INT)    Pike_error("Invalid argument 1, expected int.\n");    else    DVB->cardn = (u_short)Pike_sp[-1].u.integer; -  +  }       if((devname = mk_devname(DVB->cardn, FRONTENDDEVICE)) == NULL)    Pike_error("Internal error: can't malloc buffer.\n");
920:    unsigned int length,info_len,data_len, index;    int retries;    int pid; -  int n,i; +  int n;       int pnr = -1;   
1026:    data_len = ((buffer[index+3] & 0x0F) << 8) + buffer[index+4];    if (buffer[index]==0x02 || buffer[index]==0x03 || buffer[index]==0x04)    { -  i = index+5; +  unsigned int i = index+5;    while (i < index+5+data_len)    {    switch (buffer[i])
1081:    */   static void f_stream_attach(INT32 args) {    -  int err, pid, ptype = PID_NONE; +  int err, ptype = PID_NONE; +  unsigned int pid;    struct svalue feeder;    unsigned char *pktdata;   
1123:      static void f__sprintf(INT32 args) {    -  unsigned int n = 0, x, cnt; +  int n = 0, x, cnt;    dvb_stream_data *st = DVB->stream;       check_all_args("DVB.dvb->_sprintf", args, BIT_INT, BIT_MAPPING | BIT_VOID, 0);
1431:    if(DVBAudio->fd != -1)    Pike_error("Create already called!\n");    -  if(args) +  if(args) {    if(Pike_sp[-1].type != T_INT)    Pike_error("Invalid argument 1, expected int.\n");    else    devno = (u_short)Pike_sp[-1].u.integer; -  +  }    pop_n_elems(args);    if((devname = mk_devname(devno, AUDIODEVICE)) == NULL)    Pike_error("Internal error: can't malloc buffer.\n");