mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-07 22:03:50 +00:00
libjs: fix build warning under gcc 4.3
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11522 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
ec864cee4c
commit
e79e13bcb0
@ -4574,12 +4574,13 @@ JS_NewRegExpObject(JSContext *cx, char *bytes, size_t length, uintN flags)
|
|||||||
#if JS_HAS_REGEXPS
|
#if JS_HAS_REGEXPS
|
||||||
jschar *chars;
|
jschar *chars;
|
||||||
JSObject *obj;
|
JSObject *obj;
|
||||||
|
size_t slength = length;
|
||||||
|
|
||||||
CHECK_REQUEST(cx);
|
CHECK_REQUEST(cx);
|
||||||
chars = js_InflateString(cx, bytes, &length);
|
chars = js_InflateString(cx, bytes, &slength);
|
||||||
if (!chars)
|
if (!chars)
|
||||||
return NULL;
|
return NULL;
|
||||||
obj = js_NewRegExpObject(cx, NULL, chars, length, flags);
|
obj = js_NewRegExpObject(cx, NULL, chars, slength, flags);
|
||||||
JS_free(cx, chars);
|
JS_free(cx, chars);
|
||||||
return obj;
|
return obj;
|
||||||
#else
|
#else
|
||||||
|
@ -939,11 +939,12 @@ JS_EvaluateInStackFrame(JSContext *cx, JSStackFrame *fp,
|
|||||||
{
|
{
|
||||||
jschar *chars;
|
jschar *chars;
|
||||||
JSBool ok;
|
JSBool ok;
|
||||||
|
size_t slength = length;
|
||||||
|
|
||||||
chars = js_InflateString(cx, bytes, &length);
|
chars = js_InflateString(cx, bytes, &slength);
|
||||||
if (!chars)
|
if (!chars)
|
||||||
return JS_FALSE;
|
return JS_FALSE;
|
||||||
ok = JS_EvaluateUCInStackFrame(cx, fp, chars, length, filename, lineno,
|
ok = JS_EvaluateUCInStackFrame(cx, fp, chars, slength, filename, lineno,
|
||||||
rval);
|
rval);
|
||||||
JS_free(cx, chars);
|
JS_free(cx, chars);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user