diff options
author | Paul Bignier <paul.bignier@gmail.com> | 2015-12-02 09:59:35 +0100 |
---|---|---|
committer | Paul Bignier <paul.bignier@gmail.com> | 2015-12-02 09:59:35 +0100 |
commit | e172f0d00319b4d4ec87d5d310d552dddcd71963 (patch) | |
tree | d11a02bc5095a19e98e8a3ca2dcdd856714d33ec | |
parent | fcc1e08cf64d5fa27091ebd7b54ca2c748680dbf (diff) | |
download | nspr-hg-e172f0d00319b4d4ec87d5d310d552dddcd71963.tar.gz |
Bug 1225479 - Fixed uninitialized variables warnings at compilation r=wtc
-rw-r--r-- | pr/src/io/prprf.c | 2 | ||||
-rw-r--r-- | pr/src/io/prscanf.c | 4 | ||||
-rw-r--r-- | pr/src/misc/prtpool.c | 4 | ||||
-rw-r--r-- | pr/src/pthreads/ptio.c | 6 |
4 files changed, 8 insertions, 8 deletions
diff --git a/pr/src/io/prprf.c b/pr/src/io/prprf.c index e7c35cfb..798ea2a4 100644 --- a/pr/src/io/prprf.c +++ b/pr/src/io/prprf.c @@ -697,7 +697,7 @@ static int dosprintf(SprintfState *ss, const char *fmt, va_list ap) char *hexp; int rv, i; struct NumArg* nas = NULL; - struct NumArg* nap; + struct NumArg* nap = NULL; struct NumArg nasArray[ NAS_DEFAULT_NUM ]; char pattern[20]; const char* dolPt = NULL; /* in "%4$.2f", dolPt will point to . */ diff --git a/pr/src/io/prscanf.c b/pr/src/io/prscanf.c index b95d6561..9d75d824 100644 --- a/pr/src/io/prscanf.c +++ b/pr/src/io/prscanf.c @@ -194,7 +194,7 @@ static PRStatus GetInt(ScanfState *state, int code) { char buf[FMAX + 1], *p; - int ch; + int ch = 0; static const char digits[] = "0123456789abcdefABCDEF"; PRBool seenDigit = PR_FALSE; int base; @@ -304,7 +304,7 @@ static PRStatus GetFloat(ScanfState *state) { char buf[FMAX + 1], *p; - int ch; + int ch = 0; PRBool seenDigit = PR_FALSE; if (state->width == 0 || state->width > FMAX) { diff --git a/pr/src/misc/prtpool.c b/pr/src/misc/prtpool.c index 8870a3cf..0671cc19 100644 --- a/pr/src/misc/prtpool.c +++ b/pr/src/misc/prtpool.c @@ -281,8 +281,8 @@ PRThreadPool *tp = (PRThreadPool *) arg; int pollfd_cnt, pollfds_used; int rv; PRCList *qp, *nextqp; -PRPollDesc *pollfds; -PRJob **polljobs; +PRPollDesc *pollfds = NULL; +PRJob **polljobs = NULL; int poll_timeout; PRIntervalTime now; diff --git a/pr/src/pthreads/ptio.c b/pr/src/pthreads/ptio.c index 125f1f93..e4fe5198 100644 --- a/pr/src/pthreads/ptio.c +++ b/pr/src/pthreads/ptio.c @@ -3765,7 +3765,7 @@ static PRInt32 _pr_poll_with_poll( * We use these variables to figure out how much time has * elapsed and how much of the timeout still remains. */ - PRIntervalTime start, elapsed, remaining; + PRIntervalTime start = 0, elapsed, remaining; if (pt_TestAbort()) return -1; @@ -4019,7 +4019,7 @@ static PRInt32 _pr_poll_with_select( * We use these variables to figure out how much time has * elapsed and how much of the timeout still remains. */ - PRIntervalTime start, elapsed, remaining; + PRIntervalTime start = 0, elapsed, remaining; if (pt_TestAbort()) return -1; @@ -4919,7 +4919,7 @@ PR_IMPLEMENT(PRInt32) PR_Select( * We use these variables to figure out how much time has elapsed * and how much of the timeout still remains. */ - PRIntervalTime start, elapsed, remaining; + PRIntervalTime start = 0, elapsed, remaining; static PRBool unwarned = PR_TRUE; if (unwarned) unwarned = _PR_Obsolete( "PR_Select", "PR_Poll"); |