summaryrefslogtreecommitdiff
path: root/lang/spidermonkey17/files/patch-warnings
blob: cfbdcd76d504c5139a1b45fe88452c8d9994800e (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
--- jsdtoa.c	2007-01-18 00:56:12.000000000 +0100
+++ jsdtoa.c	2008-06-19 16:34:02.000000000 +0200
@@ -247,7 +247,8 @@
 #define word1(x)        JSDOUBLE_LO32(x)
 #define set_word1(x, y) JSDOUBLE_SET_LO32(x, y)
 
-#define Storeinc(a,b,c) (*(a)++ = (b) << 16 | (c) & 0xffff)
+#define Storeinc(a,b,c) (*(a)++ = (b) << 16 | ((c) & 0xffff))
+
 
 /* #define P DBL_MANT_DIG */
 /* Ten_pmax = floor(P*log(2)/log(5)) */
--- jspubtd.h	2007-06-23 01:13:21.000000000 +0200
+++ jspubtd.h	2008-06-19 16:26:08.000000000 +0200
@@ -616,7 +616,7 @@
 typedef JSBool
 (* JS_DLL_CALLBACK JSArgumentFormatter)(JSContext *cx, const char *format,
                                         JSBool fromJS, jsval **vpp,
-                                        va_list *app);
+                                        va_list app);
 #endif
 
 typedef JSBool
--- jsapi.c	2007-10-03 16:36:48.000000000 +0200
+++ jsapi.c	2008-06-19 17:17:52.000000000 +0200
@@ -134,7 +134,7 @@
 
 static JSBool
 TryArgumentFormatter(JSContext *cx, const char **formatp, JSBool fromJS,
-                     jsval **vpp, va_list *app)
+                     jsval **vpp, va_list app)
 {
     const char *format;
     JSArgumentFormatMap *map;
@@ -263,8 +263,7 @@
             break;
           default:
             format--;
-            if (!TryArgumentFormatter(cx, &format, JS_TRUE, &sp,
-                                      JS_ADDRESSOF_VA_LIST(ap))) {
+            if (!TryArgumentFormatter(cx, &format, JS_TRUE, &sp, ap)) {
                 return JS_FALSE;
             }
             /* NB: the formatter already updated sp, so we continue here. */
@@ -366,8 +365,7 @@
             break;
           default:
             format--;
-            if (!TryArgumentFormatter(cx, &format, JS_FALSE, &sp,
-                                      JS_ADDRESSOF_VA_LIST(ap))) {
+            if (!TryArgumentFormatter(cx, &format, JS_FALSE, &sp, ap)) {
                 goto bad;
             }
             /* NB: the formatter already updated sp, so we continue here. */
--- js.c	2007-04-20 20:45:18.000000000 +0200
+++ js.c	2008-06-19 18:17:29.000000000 +0200
@@ -978,7 +978,7 @@
                 }
             }
         }
-        fprintf(gOutFile, "%3u: %5u [%4u] %-8s",
+        fprintf(gOutFile, "%3tu: %5u [%4u] %-8s",
                 PTRDIFF(sn, notes, jssrcnote), offset, delta, name);
         switch (type) {
           case SRC_SETLINE:
--- jscntxt.h	2007-04-06 22:53:21.000000000 +0200
+++ jscntxt.h	2008-06-19 18:36:28.000000000 +0200
@@ -598,7 +598,7 @@
 
 #define JS_PUSH_TEMP_ROOT(cx,cnt,arr,tvr)                                     \
     JS_BEGIN_MACRO                                                            \
-        JS_ASSERT((ptrdiff_t)(cnt) >= 0);                                     \
+        JS_ASSERT((int)(cnt) >= 0);                                           \
         (tvr)->count = (ptrdiff_t)(cnt);                                      \
         (tvr)->u.array = (arr);                                               \
         JS_PUSH_TEMP_ROOT_COMMON(cx, tvr);                                    \
--- jsxml.c	2007-04-19 04:18:25.000000000 +0200
+++ jsxml.c	2008-06-19 18:49:44.000000000 +0200
@@ -1058,7 +1058,10 @@
             free(array->vector);
         vector = NULL;
     } else {
-        if ((size_t)capacity > ~(size_t)0 / sizeof(void *) ||
+        if ( 
+#if JS_BITS_PER_WORD == 32 
+        	(size_t)capacity > ~(size_t)0 / sizeof(void *) ||  
+#endif
             !(vector = (void **)
                        realloc(array->vector, capacity * sizeof(void *)))) {
             if (cx)
@@ -1153,7 +1156,10 @@
                 JS_CEILING_LOG2(log2, capacity);
                 capacity = JS_BIT(log2);
             }
-            if ((size_t)capacity > ~(size_t)0 / sizeof(void *) ||
+            if ( 
+#if JS_BITS_PER_WORD == 32 
+                (size_t)capacity > ~(size_t)0 / sizeof(void *) ||  
+#endif
                 !(vector = (void **)
                            realloc(array->vector, capacity * sizeof(void *)))) {
                 JS_ReportOutOfMemory(cx);
--- jsarray.c	2007-09-29 01:29:52.000000000 +0200
+++ jsarray.c	2008-06-19 19:12:02.000000000 +0200
@@ -1051,10 +1051,12 @@
      * Check that its size does not overflow size_t, which would allow for
      * indexing beyond the end of the malloc'd vector.
      */
-    if (len > ((size_t) -1) / sizeof(jsval)) {
+#if JS_BITS_PER_WORD == 32
+    if ((size_t)len > ~(size_t)0 / sizeof(jsval)) {
         JS_ReportOutOfMemory(cx);
         return JS_FALSE;
     }
+#endif
 
     vec = (jsval *) JS_malloc(cx, ((size_t) len) * sizeof(jsval));
     if (!vec)