Branch: Tag:

2000-08-16

2000-08-16 20:12:50 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Fixed a few warnings.

Rev: src/modules/Image/colortable.c:1.94
Rev: src/modules/Image/encodings/avs.c:1.11
Rev: src/modules/Image/encodings/bmp.c:1.27
Rev: src/modules/Image/encodings/gif.c:1.59
Rev: src/modules/Image/encodings/tga.c:1.23
Rev: src/modules/Image/encodings/x.c:1.33
Rev: src/modules/Image/encodings/xcf.c:1.21
Rev: src/modules/Image/image.c:1.176
Rev: src/modules/Image/image_module.c:1.8
Rev: src/modules/Math/math_matrix.c:1.17
Rev: src/modules/Parser/html.c:1.113
Rev: src/modules/Parser/parser.c:1.9
Rev: src/modules/_Crypto/cbc.c:1.17
Rev: src/modules/_Crypto/crypto.c:1.38
Rev: src/modules/files/file.c:1.188

1:   #include "global.h"   #include "stralloc.h"   #include "global.h" - RCSID("$Id: parser.c,v 1.8 2000/07/28 07:14:14 hubbe Exp $"); + RCSID("$Id: parser.c,v 1.9 2000/08/16 20:02:02 grubba Exp $");   #include "pike_macros.h"   #include "interpret.h"   #include "program.h"
80:    { 0,0,0,0,0 }   };    + /* Avoid loss of precision warnings. */ + #ifdef __ECL + static inline long TO_LONG(ptrdiff_t x) + { +  return DO_NOT_WARN((long)x); + } + #else /* !__ECL */ + #define TO_LONG(x) ((long)(x)) + #endif /* __ECL */ +    #ifdef PIKE_DEBUG - #define PARSER_CHECK_STACK(X) do { if (save_sp != sp) { fatal("%s:%d: %d droppings on stack! previous init: %s\n", __FILE__, __LINE__, sp - save_sp,X); } } while(0) + #define PARSER_CHECK_STACK(X) do { \ +  if (save_sp != sp) { \ +  fatal("%s:%d: %d droppings on stack! previous init: %s\n", \ +  __FILE__, __LINE__, \ +  TO_LONG(sp - save_sp), X); \ +  } \ +  } while(0)   #else   #define PARSER_CHECK_STACK(X)   #endif /* PIKE_DEBUG */