Skip to content
Snippets Groups Projects
Commit 860097de authored by rswindell's avatar rswindell
Browse files

Fix MSVC10 warnings and new bug in User.chk_ar().

parent 8ad1afdf
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright 2010 Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 2011 Rob Swindell - http://www.synchro.net/copyright.html *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
......@@ -412,7 +412,6 @@ static JSBool js_user_set(JSContext *cx, JSObject *obj, jsid id, JSBool strict,
jsint val;
ulong usermisc;
jsint tiny;
JSString* js_str;
private_t* p;
int32 usernumber;
jsrefcount rc;
......@@ -548,7 +547,7 @@ static JSBool js_user_set(JSContext *cx, JSObject *obj, jsid id, JSBool strict,
case USER_PROP_NS_TIME:
JS_RESUMEREQUEST(cx, rc);
if(JS_ValueToInt32(cx,*vp,&val))
putuserrec(p->cfg,p->user->number,U_NS_TIME,0,ultoa(p->user->ns_time=val,tmp,16));
putuserrec(p->cfg,p->user->number,U_NS_TIME,0,ultoa((ulong)(p->user->ns_time=val),tmp,16));
rc=JS_SUSPENDREQUEST(cx);
break;
case USER_PROP_PROT:
......@@ -886,7 +885,6 @@ js_chk_ar(JSContext *cx, uintN argc, jsval *arglist)
JSObject *obj=JS_THIS_OBJECT(cx, arglist);
jsval *argv=JS_ARGV(cx, arglist);
uchar* ar;
JSString* js_str;
private_t* p;
jsrefcount rc;
char *ars;
......@@ -897,7 +895,7 @@ js_chk_ar(JSContext *cx, uintN argc, jsval *arglist)
return JS_FALSE;
JSVALUE_TO_STRING(cx,argv[0], ars, NULL);
if(arstr==NULL)
if(ars==NULL)
return JS_FALSE;
rc=JS_SUSPENDREQUEST(cx);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment