From dab75b00c334857fa00b41cf09a33b59710c062d Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Tue, 7 May 2013 07:22:44 +0000 Subject: [PATCH] Address a few MSVC10 warning C4700: uninitialized local variable 'xxx' used --- src/sbbs3/js_console.cpp | 8 ++++---- src/sbbs3/js_sprintf.c | 4 ++-- src/sbbs3/js_uifc.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/sbbs3/js_console.cpp b/src/sbbs3/js_console.cpp index ebe3e19d62..828643df22 100644 --- a/src/sbbs3/js_console.cpp +++ b/src/sbbs3/js_console.cpp @@ -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 2011 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2013 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 * @@ -957,7 +957,7 @@ js_print(JSContext *cx, uintN argc, jsval *arglist) uintN i; sbbs_t* sbbs; char* cstr=NULL; - size_t cstr_sz; + size_t cstr_sz=0; jsrefcount rc; JS_SET_RVAL(cx, arglist, JSVAL_VOID); @@ -1009,7 +1009,7 @@ js_write(JSContext *cx, uintN argc, jsval *arglist) sbbs_t* sbbs; uintN i; char* str=NULL; - size_t str_sz; + size_t str_sz=0; size_t len; jsrefcount rc; @@ -1200,7 +1200,7 @@ js_uselect(JSContext *cx, uintN argc, jsval *arglist) int32 num=0; char* title=NULL; char* item=NULL; - char* ar_str; + char* ar_str=NULL; uchar* ar=NULL; sbbs_t* sbbs; JSString* js_str; diff --git a/src/sbbs3/js_sprintf.c b/src/sbbs3/js_sprintf.c index 8dfc333a27..3c234fa791 100644 --- a/src/sbbs3/js_sprintf.c +++ b/src/sbbs3/js_sprintf.c @@ -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 2011 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2013 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 * @@ -44,7 +44,7 @@ js_sprintf(JSContext *cx, uint argn, uintN argc, jsval *argv) char* op; char* p; char *p2=NULL; - size_t p2_sz; + size_t p2_sz=0; JSVALUE_TO_MSTRING(cx, argv[argn++], op, NULL); if(JS_IsExceptionPending(cx)) diff --git a/src/sbbs3/js_uifc.c b/src/sbbs3/js_uifc.c index 40b6ed4a39..b7fce19520 100644 --- a/src/sbbs3/js_uifc.c +++ b/src/sbbs3/js_uifc.c @@ -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 2011 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2013 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 * @@ -512,7 +512,7 @@ js_uifc_list(JSContext *cx, uintN argc, jsval *arglist) jsuint numopts; str_list_t opts=NULL; char *opt=NULL; - size_t opt_sz; + size_t opt_sz=0; jsrefcount rc; JS_SET_RVAL(cx, arglist, JSVAL_VOID); -- GitLab