diff --git a/js/src/jsprf.c b/js/src/jsprf.c index 416c16c82c7..5fca5cb2c16 100644 --- a/js/src/jsprf.c +++ b/js/src/jsprf.c @@ -707,7 +707,7 @@ static int dosprintf(SprintfState *ss, const char *fmt, va_list ap) char pattern[20]; const char *dolPt = NULL; /* in "%4$.2f", dolPt will poiont to . */ #ifdef JS_C_STRINGS_ARE_UTF8 - char utf8buf[6]; + uint8 utf8buf[6]; int utf8len; #endif @@ -950,7 +950,7 @@ static int dosprintf(SprintfState *ss, const char *fmt, va_list ap) #ifdef JS_C_STRINGS_ARE_UTF8 u.wch = va_arg(ap, int); utf8len = js_OneUcs4ToUtf8Char (utf8buf, u.wch); - rv = (*ss->stuff)(ss, utf8buf, utf8len); + rv = (*ss->stuff)(ss, (char *)utf8buf, utf8len); break; #endif case TYPE_INTN: diff --git a/js/src/jsstr.c b/js/src/jsstr.c index 958d5939d43..d00dac39804 100644 --- a/js/src/jsstr.c +++ b/js/src/jsstr.c @@ -2838,7 +2838,7 @@ js_DeflateString(JSContext *cx, const jschar *chars, size_t length) size_t size; char *bytes; - size = js_GetDeflatedStringLength(chars, length); + size = js_GetDeflatedStringLength(cx, chars, length); if (size == (size_t)-1) return NULL; bytes = (char *) (cx ? JS_malloc(cx, size+1) : malloc(size+1)); @@ -2978,7 +2978,7 @@ js_InflateStringToBuffer(JSContext *cx, const char *src, size_t srclen, if ((src[j] & 0xC0) != 0x80) goto badCharacter; } - v = Utf8ToOneUcs4Char(src, n); + v = Utf8ToOneUcs4Char((uint8 *)src, n); if (v >= 0x10000) { v -= 0x10000; if (v > 0xFFFFF || dstlen < 2) {