aboutsummaryrefslogtreecommitdiffstats
path: root/devel/nspr/files/patch-warnings
blob: 3a89f86e1aed42710fcceb83cfd23612fa149d6d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
--- ../pr/src/pthreads/ptsynch.c    Mon Nov 22 16:24:53 2004
+++ ../pr/src/pthreads/ptsynch.c    Mon Jul 25 00:03:49 2005
@@ -63,5 +63,5 @@
 #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.
@@ -343,5 +343,8 @@
     if (cv != NULL)
     {
-        int rv = _PT_PTHREAD_COND_INIT(cv->cv, _pt_cvar_attr); 
+#if defined(DEBUG) || defined(FORCE_PR_ASSERT)
+        int rv =
+#endif
+       _PT_PTHREAD_COND_INIT(cv->cv, _pt_cvar_attr); 
         PR_ASSERT(0 == rv);
         cv->lock = lock;
@@ -358,5 +361,9 @@
     if (0 > PR_AtomicDecrement(&cvar->notify_pending))
     {
-        PRIntn rv = pthread_cond_destroy(&cvar->cv); PR_ASSERT(0 == rv);
+#if defined(DEBUG) || defined(FORCE_PR_ASSERT)
+        PRIntn rv =
+#endif
+       pthread_cond_destroy(&cvar->cv);
+   PR_ASSERT(0 == rv);
 #if defined(DEBUG)
         memset(cvar, 0xaf, sizeof(PRCondVar));
@@ -1080,6 +1087,9 @@
     if (cv != NULL)
     {
+#if defined(DEBUG) || defined(FORCE_PR_ASSERT)
         int rv;
-        rv = _PT_PTHREAD_COND_INIT(cv->cv, _pt_cvar_attr); 
+        rv =
+#endif
+       _PT_PTHREAD_COND_INIT(cv->cv, _pt_cvar_attr); 
         PR_ASSERT(0 == rv);
         cv->lock = _PR_NAKED_CV_LOCK;
--- ../pr/include/prcountr.h    Sun Apr 25 11:00:47 2004
+++ ../pr/include/prcountr.h    Mon Jul 25 20:43:03 2005
@@ -427,5 +427,5 @@
     (counter) = PR_GetCounter((handle))
 #else
-#define PR_GET_COUNTER(counter,handle) 0
+#define PR_GET_COUNTER(counter,handle)
 #endif
 
@@ -501,5 +501,5 @@
     (next) = PR_FindNextCounterQname((handle))
 #else
-#define PR_FIND_NEXT_COUNTER_QNAME(next,handle) NULL
+#define PR_FIND_NEXT_COUNTER_QNAME(next,handle)
 #endif
 
--- ../pr/src/io/prprf.c    2008-05-31 11:10:17.000000000 -0400
+++ ../pr/src/io/prprf.c    2009-11-04 14:27:19.000000000 -0500
@@ -698,5 +698,5 @@
     int rv, i;
     struct NumArg* nas = NULL;
-    struct NumArg* nap;
+    struct NumArg* nap = NULL;
     struct NumArg  nasArray[ NAS_DEFAULT_NUM ];
     char  pattern[20];
--- ../pr/src/io/prscanf.c  2005-08-05 18:44:06.000000000 -0400
+++ ../pr/src/io/prscanf.c  2009-11-04 14:31:24.000000000 -0500
@@ -230,5 +230,5 @@
 {
     char buf[FMAX + 1], *p;
-    int ch;
+    int ch = -1;
     static const char digits[] = "0123456789abcdefABCDEF";
     PRBool seenDigit = PR_FALSE;
@@ -340,5 +340,5 @@
 {
     char buf[FMAX + 1], *p;
-    int ch;
+    int ch = -1;
     PRBool seenDigit = PR_FALSE;
 
--- ../pr/src/misc/pralarm.c    2009-05-06 01:40:37.000000000 -0400
+++ ../pr/src/misc/pralarm.c    2009-11-04 14:34:27.000000000 -0500
@@ -134,5 +134,5 @@
     while (why != abort)
     {
-        PRIntervalTime pause;
+        PRIntervalTime pause = 0;
 
         PR_Lock(alarm->lock);
--- ../pr/src/misc/prdtoa.c 2009-10-05 18:58:41.000000000 -0400
+++ ../pr/src/misc/prdtoa.c 2009-11-04 14:36:24.000000000 -0500
@@ -2765,5 +2765,5 @@
    */
 
-   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;
--- ../pr/src/misc/prenv.c  2009-05-06 01:40:37.000000000 -0400
+++ ../pr/src/misc/prenv.c  2009-11-04 15:02:32.000000000 -0500
@@ -94,5 +94,10 @@
 
     _PR_LOCK_ENV();
-    result = _PR_MD_PUT_ENV(string);
+    /*
+     * putenv() does not modify the contents, but allows
+     * the caller to modify it later. So, it is Ok to
+     * drop the const-ness here...
+     */
+    result = _PR_MD_PUT_ENV((char *)string);
     _PR_UNLOCK_ENV();
     return (result)? PR_FAILURE : PR_SUCCESS;
--- ../pr/src/misc/prtpool.c    2005-04-28 18:37:25.000000000 -0400
+++ ../pr/src/misc/prtpool.c    2009-11-04 15:08:05.000000000 -0500
@@ -314,6 +314,6 @@
 int rv;
 PRCList *qp, *nextqp;
-PRPollDesc *pollfds;
-PRJob **polljobs;
+PRPollDesc *pollfds = NULL;
+PRJob **polljobs = NULL;
 int poll_timeout;
 PRIntervalTime now;