From 4b2a5caee97fef90e0c97d7ca147e492d62ab8da Mon Sep 17 00:00:00 2001 From: "nisheeth%netscape.com" Date: Mon, 9 Aug 1999 23:52:45 +0000 Subject: [PATCH] Fixed some warnings in xmlparse.c. Thanks a lot to kherron@sgum.mci.com for noticing these warnings, filing a bug, and attaching an attempted fix to the bug report. git-svn-id: svn://10.0.0.236/trunk@42852 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/expat/xmltok/xmldef.h | 8 +++++--- mozilla/parser/expat/lib/xmldef.h | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/mozilla/expat/xmltok/xmldef.h b/mozilla/expat/xmltok/xmldef.h index f9edff8a4cb..7ce172ba5fa 100644 --- a/mozilla/expat/xmltok/xmldef.h +++ b/mozilla/expat/xmltok/xmldef.h @@ -56,16 +56,18 @@ particular environments. */ */ #include "nspr.h" -#define malloc(x) PR_Malloc(x) -#define realloc(x, y) PR_Realloc((x), (y)) +#define malloc(x) PR_Malloc((size_t)(x)) +#define realloc(x, y) PR_Realloc((x), (size_t)(y)) #define calloc(x, y) PR_Calloc((x),(y)) #define free(x) PR_Free(x) +#define memcpy(x, y, z) memcpy((x), (y), (size_t)(z)) +#define memmove(x, y, z) memmove((x), (y), (size_t)(z)) +#define memcmp(x, y, z) memcmp((x), (y), (size_t)(z)) #if PR_BYTES_PER_INT != 4 typedef PRInt32 int; #endif - /* Enable Unicode string processing in expat */ #define XML_UNICODE diff --git a/mozilla/parser/expat/lib/xmldef.h b/mozilla/parser/expat/lib/xmldef.h index f9edff8a4cb..7ce172ba5fa 100644 --- a/mozilla/parser/expat/lib/xmldef.h +++ b/mozilla/parser/expat/lib/xmldef.h @@ -56,16 +56,18 @@ particular environments. */ */ #include "nspr.h" -#define malloc(x) PR_Malloc(x) -#define realloc(x, y) PR_Realloc((x), (y)) +#define malloc(x) PR_Malloc((size_t)(x)) +#define realloc(x, y) PR_Realloc((x), (size_t)(y)) #define calloc(x, y) PR_Calloc((x),(y)) #define free(x) PR_Free(x) +#define memcpy(x, y, z) memcpy((x), (y), (size_t)(z)) +#define memmove(x, y, z) memmove((x), (y), (size_t)(z)) +#define memcmp(x, y, z) memcmp((x), (y), (size_t)(z)) #if PR_BYTES_PER_INT != 4 typedef PRInt32 int; #endif - /* Enable Unicode string processing in expat */ #define XML_UNICODE