--- pr/include/prcountr.h.orig 2015-10-16 13:22:19 UTC +++ pr/include/prcountr.h @@ -394,7 +394,7 @@ NSPR_API(void) #define PR_GET_COUNTER(counter,handle)\ (counter) = PR_GetCounter((handle)) #else -#define PR_GET_COUNTER(counter,handle) 0 +#define PR_GET_COUNTER(counter,handle) #endif NSPR_API(PRUint32) @@ -468,7 +468,7 @@ NSPR_API(void) #define PR_FIND_NEXT_COUNTER_QNAME(next,handle)\ (next) = PR_FindNextCounterQname((handle)) #else -#define PR_FIND_NEXT_COUNTER_QNAME(next,handle) NULL +#define PR_FIND_NEXT_COUNTER_QNAME(next,handle) #endif NSPR_API(PRCounterHandle) --- pr/src/io/prprf.c.orig 2015-10-16 13:22:19 UTC +++ pr/src/io/prprf.c @@ -697,7 +697,7 @@ static int dosprintf(SprintfState *ss, c 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 . */ --- pr/src/io/prscanf.c.orig 2015-10-16 13:22:19 UTC +++ 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 = -1; 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 = -1; PRBool seenDigit = PR_FALSE; if (state->width == 0 || state->width > FMAX) { --- pr/src/misc/pralarm.c.orig 2015-10-16 13:22:19 UTC +++ pr/src/misc/pralarm.c @@ -101,7 +101,7 @@ static void PR_CALLBACK pr_alarmNotifier while (why != abort) { - PRIntervalTime pause; + PRIntervalTime pause = 0; PR_Lock(alarm->lock); while (why == scan) --- pr/src/misc/prdtoa.c.orig 2015-10-16 13:22:19 UTC +++ pr/src/misc/prdtoa.c @@ -2751,7 +2751,7 @@ dtoa to hold the suppressed trailing zeros. */ - int bbits, b2, b5, be, dig, i, ieps, ilim, ilim0, ilim1, + int bbits, b2, b5, be, dig, i, ieps, ilim = -1, ilim0, ilim1 = -1, j, j1, k, k0, k_check, leftright, m2, m5, s2, s5, spec_case, try_quick; Long L; --- pr/src/misc/prtpool.c.orig 2015-10-16 13:22:19 UTC +++ 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; --- pr/src/pthreads/ptio.c.orig 2015-10-16 13:22:19 UTC +++ 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; @@ -4934,6 +4934,7 @@ PR_IMPLEMENT(PRInt32) PR_Select( if (timeout == PR_INTERVAL_NO_TIMEOUT) { tvp = NULL; + start = 0; /* Not needed, but shuts down a warning */ } else { tv.tv_sec = (PRInt32)PR_IntervalToSeconds(timeout); tv.tv_usec = (PRInt32)PR_IntervalToMicroseconds( --- pr/src/pthreads/ptsynch.c.orig 2015-10-16 13:22:19 UTC +++ pr/src/pthreads/ptsynch.c @@ -30,7 +30,7 @@ static pthread_t pt_zero_tid; /* a null #endif /* defined(_PR_DCETHREADS) */ #endif /* defined(DEBUG) */ -#if defined(FREEBSD) +#if defined(FREEBSD) && (defined(DEBUG) || defined(FORCE_PR_ASSERT)) /* * On older versions of FreeBSD, pthread_mutex_trylock returns EDEADLK. * Newer versions return EBUSY. We still need to support both.