Message-Id: <199905082104.VAA49736@out4.ibm.net> From: "Mark E." To: djgpp-workers AT delorie DOT com Date: Sat, 8 May 1999 17:04:50 -0400 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: warnings in malloc.c X-mailer: Pegasus Mail for Win32 (v3.01d) Reply-To: djgpp-workers AT delorie DOT com When compiling malloc.c with -W, gcc reports warnings for comparisons between unsigned and signed in several places. This occurs because malloc and realloc take a size_t while BLOCK uses an int. The fix is trivial but hardly critical: *** src/libc/ansi/stdlib/malloc.c.orig Mon Apr 19 23:33:08 1999 --- src/libc/ansi/stdlib/malloc.c Sat May 8 16:50:50 1999 *************** *** 6,12 **** #include typedef struct BLOCK { ! int size; struct BLOCK *next; int bucket; } BLOCK; --- 6,12 ---- #include typedef struct BLOCK { ! size_t size; struct BLOCK *next; int bucket; } BLOCK; *************** realloc(void *ptr, size_t size) *** 329,335 **** { BLOCK *b; char *newptr; ! int copysize; if (ptr == 0) return malloc(size); --- 329,335 ---- { BLOCK *b; char *newptr; ! size_t copysize; if (ptr == 0) return malloc(size); --- Mark Elbrecht, snowball3 AT bigfoot DOT com http://snowball.frogspace.net/