summaryrefslogtreecommitdiff
path: root/devel/nspr/files/patch-warnings
blob: 5b0abcf043a761d6ca76ac702f8368fceb4dd8a0 (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
--- pr/include/prcountr.h.orig	2024-10-27 01:59:53.601575000 +0200
+++ pr/include/prcountr.h	2024-10-27 02:00:39.833268000 +0200
@@ -394,7 +394,7 @@
 #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 @@
 #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/misc/pralarm.c.orig	2024-10-27 02:01:01.288692000 +0200
+++ pr/src/misc/pralarm.c	2024-10-27 02:01:33.448421000 +0200
@@ -94,7 +94,7 @@
   enum { notify, abort, scan } why = scan;
 
   while (why != abort) {
-    PRIntervalTime pause;
+    PRIntervalTime pause = 0;
 
     PR_Lock(alarm->lock);
     while (why == scan) {
--- pr/src/misc/prdtoa.c.orig	2024-10-27 02:01:55.919817000 +0200
+++ pr/src/misc/prdtoa.c	2024-10-27 02:03:06.231244000 +0200
@@ -2835,8 +2835,8 @@
      to hold the suppressed trailing zeros.
   */
 
-  int bbits, b2, b5, be, dig, i, ieps, ilim, ilim0, ilim1, j, j1, k, k0,
-      k_check, leftright, m2, m5, s2, s5, spec_case, try_quick;
+  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;
 #ifndef Sudden_Underflow
   int denorm;
--- pr/src/pthreads/ptio.c.orig	2024-10-27 02:03:27.854520000 +0200
+++ pr/src/pthreads/ptio.c	2024-10-27 02:04:19.446319000 +0200
@@ -4818,6 +4818,7 @@
 
   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	2024-10-27 02:04:43.045339000 +0200
+++ pr/src/pthreads/ptsynch.c	2024-10-27 02:05:06.901438000 +0200
@@ -25,7 +25,7 @@
 extern PTDebug pt_debug; /* this is shared between several modules */
 #  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.