Bug 699567: fix bugs pointed out by compiler warnings. r=bbondy. NSPR_4_9_1_BETA1
authorwtc%google.com
Tue, 08 May 2012 22:55:12 +0000
changeset 4386 6f5c6760c899d025776de5bfb6633b7df8fd83d3
parent 4385 001a2d3df4bf9217bc0a39527767cebf4382a523
child 4387 56b84142d57989764c331dc59dcbd69b7f61da3a
push idunknown
push userunknown
push dateunknown
reviewersbbondy
bugs699567
Bug 699567: fix bugs pointed out by compiler warnings. r=bbondy.
pr/src/io/prprf.c
--- a/pr/src/io/prprf.c
+++ b/pr/src/io/prprf.c
@@ -628,17 +628,17 @@ static struct NumArg* BuildArgArray( con
 	    break;
 
 	case TYPE_STRING:
 	    nas[cn].u.s = va_arg( ap, char* );
 	    break;
 
 #ifdef WIN32
 	case TYPE_WSTRING:
-	    nas[cn].u.s = va_arg( ap, WCHAR* );
+	    nas[cn].u.ws = va_arg( ap, WCHAR* );
 	    break;
 #endif
 
 	case TYPE_INTSTR:
 	    nas[cn].u.ip = va_arg( ap, int* );
 	    break;
 
 	case TYPE_DOUBLE:
@@ -670,17 +670,17 @@ static int dosprintf(SprintfState *ss, c
 	char ch;
 	int i;
 	long l;
 	PRInt64 ll;
 	double d;
 	const char *s;
 	int *ip;
 #ifdef WIN32
-	WCHAR *ws;
+	const WCHAR *ws;
 #endif
     } u;
     const char *fmt0;
     static char *hex = "0123456789abcdef";
     static char *HEX = "0123456789ABCDEF";
     char *hexp;
     int rv, i;
     struct NumArg* nas = NULL;