From 989817328a260a08ed82128e1103ef3669b01caf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?= <grubba@grubba.org> Date: Fri, 11 Aug 2000 13:05:41 +0200 Subject: [PATCH] Fixed a few warnings. Rev: src/modules/files/file.c:1.185 Rev: src/post_modules/GL/auto.c.in:1.15 Rev: src/threads.c:1.136 --- src/modules/files/file.c | 4 ++-- src/post_modules/GL/auto.c.in | 18 +++++++++++------- src/threads.c | 4 ++-- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/modules/files/file.c b/src/modules/files/file.c index bd95bdbd41..d354ae178e 100644 --- a/src/modules/files/file.c +++ b/src/modules/files/file.c @@ -6,7 +6,7 @@ /**/ #define NO_PIKE_SHORTHAND #include "global.h" -RCSID("$Id: file.c,v 1.184 2000/08/09 21:21:02 grubba Exp $"); +RCSID("$Id: file.c,v 1.185 2000/08/11 11:01:04 grubba Exp $"); #include "fdlib.h" #include "interpret.h" #include "svalue.h" @@ -989,7 +989,7 @@ static void file_write(INT32 args) break; while(i) { - if (iov->iov_len <= i) { + if ((ptrdiff_t)iov->iov_len <= i) { i -= iov->iov_len; iov++; iovcnt--; diff --git a/src/post_modules/GL/auto.c.in b/src/post_modules/GL/auto.c.in index 82dcdd5c54..6d4a09505f 100644 --- a/src/post_modules/GL/auto.c.in +++ b/src/post_modules/GL/auto.c.in @@ -1,5 +1,6 @@ -/* - * $Id: auto.c.in,v 1.14 2000/07/28 07:16:09 hubbe Exp $ +/* -*- C -*- + * + * $Id: auto.c.in,v 1.15 2000/08/11 11:05:41 grubba Exp $ * */ @@ -7,7 +8,7 @@ #include "config.h" -RCSID("$Id: auto.c.in,v 1.14 2000/07/28 07:16:09 hubbe Exp $"); +RCSID("$Id: auto.c.in,v 1.15 2000/08/11 11:05:41 grubba Exp $"); #include "stralloc.h" #include "pike_macros.h" #include "object.h" @@ -168,27 +169,30 @@ static void check_img_arg(struct svalue *a, struct zimage *img, img->alloc = 0; if(a->type == T_MAPPING) { struct svalue *v; - if((v=simple_mapping_string_lookup(a->u.mapping, "rgb"))) + if((v=simple_mapping_string_lookup(a->u.mapping, "rgb"))) { if(v->type == T_OBJECT && (rgbstor = (void *)get_storage(v->u.object, image_program)) != NULL && rgbstor->img != NULL) ; else error("Bad argument %d to %s.\n", arg, func); - if((v=simple_mapping_string_lookup(a->u.mapping, "luminance"))) + } + if((v=simple_mapping_string_lookup(a->u.mapping, "luminance"))) { if(v->type == T_OBJECT && (lumstor = (void *)get_storage(v->u.object, image_program)) != NULL && lumstor->img != NULL) ; else error("Bad argument %d to %s.\n", arg, func); - if((v=simple_mapping_string_lookup(a->u.mapping, "alpha"))) + } + if((v=simple_mapping_string_lookup(a->u.mapping, "alpha"))) { if(v->type == T_OBJECT && (astor = (void *)get_storage(v->u.object, image_program)) != NULL && astor->img != NULL) ; else - error("Bad argument %d to %s.\n", arg, func); + error("Bad argument %d to %s.\n", arg, func); + } } else if(a->type == T_OBJECT && (rgbstor = (void *)get_storage(a->u.object, image_program)) != NULL && rgbstor->img != NULL) diff --git a/src/threads.c b/src/threads.c index 5858d41d9f..e5d8a81ab2 100644 --- a/src/threads.c +++ b/src/threads.c @@ -1,5 +1,5 @@ #include "global.h" -RCSID("$Id: threads.c,v 1.135 2000/08/10 18:25:17 grubba Exp $"); +RCSID("$Id: threads.c,v 1.136 2000/08/11 11:02:36 grubba Exp $"); PMOD_EXPORT int num_threads = 1; PMOD_EXPORT int threads_disabled = 0; @@ -1055,7 +1055,7 @@ void f_thread_id__sprintf (INT32 args) { pop_n_elems (args); push_constant_text ("Thread.Thread("); - push_int (THIS_THREAD->id); + push_int64((ptrdiff_t)THIS_THREAD->id); push_constant_text (")"); f_add (3); } -- GitLab