From 6ec06851c9a95f279796ce833d19e1fed835328f Mon Sep 17 00:00:00 2001 From: "Mirar (Pontus Hagland)" <pike@sort.mirar.org> Date: Wed, 25 Mar 1998 15:55:08 +0100 Subject: [PATCH] warnings fixed Rev: src/modules/Image/encodings/x.c:1.13 Rev: src/modules/Image/encodings/xwd.c:1.2 --- src/modules/Image/encodings/x.c | 8 ++++---- src/modules/Image/encodings/xwd.c | 13 +++++++------ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/modules/Image/encodings/x.c b/src/modules/Image/encodings/x.c index 1d7fcdd17f..c00e361c05 100644 --- a/src/modules/Image/encodings/x.c +++ b/src/modules/Image/encodings/x.c @@ -1,9 +1,9 @@ -/* $Id: x.c,v 1.12 1998/03/23 22:52:23 mirar Exp $ */ +/* $Id: x.c,v 1.13 1998/03/25 14:55:06 mirar Exp $ */ /* **! module Image **! note -**! $Id: x.c,v 1.12 1998/03/23 22:52:23 mirar Exp $ +**! $Id: x.c,v 1.13 1998/03/25 14:55:06 mirar Exp $ **! submodule X **! **! This submodule handles encoding and decoding of @@ -29,7 +29,7 @@ #include <winsock.h> #endif -RCSID("$Id: x.c,v 1.12 1998/03/23 22:52:23 mirar Exp $"); +RCSID("$Id: x.c,v 1.13 1998/03/25 14:55:06 mirar Exp $"); #include "pike_macros.h" #include "object.h" #include "constants.h" @@ -830,7 +830,7 @@ static void image_x_decode_truecolor(INT32 args) d->b=s[bpos]; d++; - if (n && Bpp>=len) + if (n && (unsigned long)Bpp>=len) break; len-=Bpp; s+=Bpp; diff --git a/src/modules/Image/encodings/xwd.c b/src/modules/Image/encodings/xwd.c index c7750fa3a5..e6c8ca2e9c 100644 --- a/src/modules/Image/encodings/xwd.c +++ b/src/modules/Image/encodings/xwd.c @@ -1,9 +1,9 @@ -/* $Id: xwd.c,v 1.1 1998/03/23 22:52:53 mirar Exp $ */ +/* $Id: xwd.c,v 1.2 1998/03/25 14:55:08 mirar Exp $ */ /* **! module Image **! note -**! $Id: xwd.c,v 1.1 1998/03/23 22:52:53 mirar Exp $ +**! $Id: xwd.c,v 1.2 1998/03/25 14:55:08 mirar Exp $ **! submodule XWD **! **! This submodule keeps the XWD (X Windows Dump) @@ -25,7 +25,7 @@ #include "stralloc.h" #include "global.h" -RCSID("$Id: xwd.c,v 1.1 1998/03/23 22:52:53 mirar Exp $"); +RCSID("$Id: xwd.c,v 1.2 1998/03/25 14:55:08 mirar Exp $"); #include "pike_macros.h" #include "object.h" #include "constants.h" @@ -43,6 +43,7 @@ extern struct program *image_colortable_program; extern struct program *image_program; void image_x_decode_truecolor_masks(INT32 args); +void image_x_decode_pseudocolor(INT32 args); void f_aggregate_mapping(INT32 args); void f_index(INT32 args); @@ -120,7 +121,7 @@ static void image_xwd__decode(INT32 args) sp[-args].type!=T_STRING) error("Image.PNM._decode(): Illegal arguments\n"); - if (args==1 && sp[1-args].type!=T_INT || + if ((args==1 && sp[1-args].type!=T_INT) || sp[1-args].u.integer!=0) skipcmap=1; @@ -134,7 +135,7 @@ static void image_xwd__decode(INT32 args) error("Image.XWD._decode: header to small\n"); header.header_size=CARD32n(s,0); - if (s->len<header.header_size || s->len<100) + if ((unsigned long)s->len<header.header_size || s->len<100) error("Image.XWD._decode: header to small\n"); header.file_version=CARD32n(s,1); @@ -275,7 +276,7 @@ static void image_xwd__decode(INT32 args) push_string(make_shared_string("image")); - if (s->len-(header.header_size+header.ncolors*12)<0) + if (s->len-(int)(header.header_size+header.ncolors*12)<0) push_string(make_shared_string("")); else push_string(make_shared_binary_string( -- GitLab