From 265d60b16e6a1a28b5073bee3cabdbfb20f09552 Mon Sep 17 00:00:00 2001 From: Martin Stjernholm <mast@lysator.liu.se> Date: Sat, 28 Jun 2008 20:35:59 +0200 Subject: [PATCH] Fixed some warnings. Rev: src/dmalloc.h:1.65 Rev: src/encode.c:1.282 Rev: src/modules/Mysql/mysql.c:1.113 Rev: src/modules/_Image_TIFF/image_tiff.c:1.46 Rev: src/modules/spider/spider.c:1.135 --- src/dmalloc.h | 3 ++- src/encode.c | 4 ++-- src/modules/Mysql/mysql.c | 3 +-- src/modules/_Image_TIFF/image_tiff.c | 8 ++++---- src/modules/spider/spider.c | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/dmalloc.h b/src/dmalloc.h index 5d5d89afb3..f8ce6ad326 100644 --- a/src/dmalloc.h +++ b/src/dmalloc.h @@ -2,7 +2,7 @@ || 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: dmalloc.h,v 1.64 2008/06/24 01:43:46 mast Exp $ +|| $Id: dmalloc.h,v 1.65 2008/06/28 18:35:58 mast Exp $ */ #ifndef DMALLOC_H @@ -13,6 +13,7 @@ PMOD_EXPORT extern void debug_xfree(void *); PMOD_EXPORT extern void *debug_xmalloc(size_t); PMOD_EXPORT extern void *debug_xcalloc(size_t,size_t); PMOD_EXPORT extern void *debug_xrealloc(void *,size_t); +PMOD_EXPORT char *debug_xstrdup(const char *src); #if defined (HAVE_EXECINFO_H) && defined (HAVE_BACKTRACE) /* GNU libc provides some tools to inspect the stack. */ diff --git a/src/encode.c b/src/encode.c index bf9c4b27ce..7041dc19c2 100644 --- a/src/encode.c +++ b/src/encode.c @@ -2,7 +2,7 @@ || 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: encode.c,v 1.281 2008/06/27 11:33:08 grubba Exp $ +|| $Id: encode.c,v 1.282 2008/06/28 18:35:58 mast Exp $ */ #include "global.h" @@ -2190,7 +2190,7 @@ static int my_extract_char(struct decode_data *data) INT32 what, e; \ INT64 num; \ DECODE("decode_number"); \ - X=(what & TAG_MASK) | (num<<4); \ + X=(what & TAG_MASK) | ((INT32) num<<4); \ EDB(5, fprintf(stderr, "%*s ==>%ld\n", \ data->depth, "", (long) X)); \ }while(0) \ diff --git a/src/modules/Mysql/mysql.c b/src/modules/Mysql/mysql.c index 426ba27ee7..122d2bec5d 100644 --- a/src/modules/Mysql/mysql.c +++ b/src/modules/Mysql/mysql.c @@ -2,7 +2,7 @@ || 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: mysql.c,v 1.112 2008/05/24 15:14:50 grubba Exp $ +|| $Id: mysql.c,v 1.113 2008/06/28 18:35:58 mast Exp $ */ /* @@ -695,7 +695,6 @@ static void f_create(INT32 args) static void mysql__sprintf(INT32 args) { INT_TYPE type; - struct mapping * flags; if(args < 1) SIMPLE_TOO_FEW_ARGS_ERROR("_sprintf",2); diff --git a/src/modules/_Image_TIFF/image_tiff.c b/src/modules/_Image_TIFF/image_tiff.c index e6e9252f1f..dd73cf0c86 100644 --- a/src/modules/_Image_TIFF/image_tiff.c +++ b/src/modules/_Image_TIFF/image_tiff.c @@ -2,7 +2,7 @@ || 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: image_tiff.c,v 1.45 2005/10/19 16:35:53 grubba Exp $ +|| $Id: image_tiff.c,v 1.46 2008/06/28 18:35:59 mast Exp $ */ #include "global.h" @@ -302,7 +302,7 @@ void low_image_tiff_encode( struct buffer *buf, n = 0; retry: - tif = TIFFClientOpen( "memoryfile", "w", buf, + tif = TIFFClientOpen( "memoryfile", "w", (thandle_t) buf, read_buffer, write_buffer, seek_buffer, close_buffer, size_buffer, map_buffer, @@ -391,7 +391,7 @@ void low_image_tiff_encode( struct buffer *buf, */ CALL_AND_UNSET_ONERROR(tmp); - seek_buffer(buf, 0, SEEK_SET); + seek_buffer((thandle_t) buf, 0, SEEK_SET); buf->real_len = 0; /* Truncate file. */ n++; goto retry; @@ -433,7 +433,7 @@ void low_image_tiff_decode( struct buffer *buf, unsigned int i; uint32 w, h, *raster, *s; rgb_group *di, *da=NULL; - tif = TIFFClientOpen("memoryfile", "r", buf, + tif = TIFFClientOpen("memoryfile", "r", (thandle_t) buf, read_buffer, write_buffer, seek_buffer, close_buffer, size_buffer, map_buffer, diff --git a/src/modules/spider/spider.c b/src/modules/spider/spider.c index d638291c4c..d771e5488f 100644 --- a/src/modules/spider/spider.c +++ b/src/modules/spider/spider.c @@ -2,7 +2,7 @@ || 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: spider.c,v 1.134 2008/01/26 22:34:27 mast Exp $ +|| $Id: spider.c,v 1.135 2008/06/28 18:35:59 mast Exp $ */ #include "global.h" @@ -312,7 +312,7 @@ void f_set_end_quote(INT32 args) { if(args < 1 || sp[-1].type != T_INT) Pike_error("Wrong argument to set_end_quote(int CHAR)\n"); - end_quote_character = sp[-1].u.integer; + end_quote_character = (char) sp[-1].u.integer; } /*! @decl void set_start_quote(int quote) @@ -321,7 +321,7 @@ void f_set_start_quote(INT32 args) { if(args < 1 || sp[-1].type != T_INT) Pike_error("Wrong argument to set_start_quote(int CHAR)\n"); - start_quote_character = sp[-1].u.integer; + start_quote_character = (char) sp[-1].u.integer; } -- GitLab