wok-next view js185/stuff/patches/fix-811665.patch @ rev 20657

Up openjpeg2 (2.3.0), pciutils (3.5.6), pcre (8.41), pcre2 (10.31), pinentry (1.1.0), sakura (3.6.0), vte (0.50.2); add openobex, pax.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sat May 05 16:03:34 2018 +0300 (2018-05-05)
parents
children
line source
1 Description: Fix FTBFS with gcc6
2 Most fixes are returning NULL instead of false and a narrowing issues.
3 Author: Tobias Frost <tobi@debian.org>
4 Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=811665
5 Last-Update: 2016-09-25
6 ---
7 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
8 --- a/js/src/ctypes/CTypes.cpp
9 +++ b/js/src/ctypes/CTypes.cpp
10 @@ -4753,7 +4753,7 @@ NewFunctionInfo(JSContext* cx,
11 for (JSUint32 i = 0; i < argLength; ++i) {
12 bool isEllipsis;
13 if (!IsEllipsis(cx, argTypes[i], &isEllipsis))
14 - return false;
15 + return NULL;
16 if (isEllipsis) {
17 fninfo->mIsVariadic = true;
18 if (i < 1) {
19 --- a/js/src/jsapi.cpp
20 +++ b/js/src/jsapi.cpp
21 @@ -3985,7 +3985,7 @@ JS_Enumerate(JSContext *cx, JSObject *ob
22 AutoIdVector props(cx);
23 JSIdArray *ida;
24 if (!GetPropertyNames(cx, obj, JSITER_OWNONLY, &props) || !VectorToIdArray(cx, props, &ida))
25 - return false;
26 + return NULL;
27 for (size_t n = 0; n < size_t(ida->length); ++n)
28 JS_ASSERT(js_CheckForStringIndex(ida->vector[n]) == ida->vector[n]);
29 return ida;
30 --- a/js/src/jsfun.cpp
31 +++ b/js/src/jsfun.cpp
32 @@ -2051,7 +2051,7 @@ fun_toStringHelper(JSContext *cx, JSObje
34 JSString *str = JS_DecompileFunction(cx, fun, indent);
35 if (!str)
36 - return false;
37 + return NULL;
39 if (!indent)
40 cx->compartment->toSourceCache.put(fun, str);
41 @@ -2657,7 +2657,7 @@ LookupInterpretedFunctionPrototype(JSCon
42 const Shape *shape = funobj->nativeLookup(id);
43 if (!shape) {
44 if (!ResolveInterpretedFunctionPrototype(cx, funobj))
45 - return false;
46 + return NULL;
47 shape = funobj->nativeLookup(id);
48 }
49 JS_ASSERT(!shape->configurable());
50 --- a/js/src/jsiter.cpp
51 +++ b/js/src/jsiter.cpp
52 @@ -425,7 +425,7 @@ NewIteratorObject(JSContext *cx, uintN f
53 */
54 JSObject *obj = js_NewGCObject(cx, FINALIZE_OBJECT0);
55 if (!obj)
56 - return false;
57 + return NULL;
58 obj->init(cx, &js_IteratorClass, NULL, NULL, NULL, false);
59 obj->setMap(cx->compartment->emptyEnumeratorShape);
60 return obj;
61 --- a/js/src/jsparse.cpp
62 +++ b/js/src/jsparse.cpp
63 @@ -3352,7 +3352,7 @@ Parser::functionDef(JSAtom *funAtom, Fun
64 if (!outertc->inFunction() && bodyLevel && funAtom && !lambda && outertc->compiling()) {
65 JS_ASSERT(pn->pn_cookie.isFree());
66 if (!DefineGlobal(pn, outertc->asCodeGenerator(), funAtom))
67 - return false;
68 + return NULL;
69 }
71 pn->pn_blockid = outertc->blockid();
72 --- a/js/src/jsstr.cpp
73 +++ b/js/src/jsstr.cpp
74 @@ -1734,7 +1734,7 @@ class RegExpGuard
75 if (flat) {
76 patstr = flattenPattern(cx, fm.patstr);
77 if (!patstr)
78 - return false;
79 + return NULL;
80 } else {
81 patstr = fm.patstr;
82 }
83 @@ -3408,7 +3408,7 @@ js_InitStringClass(JSContext *cx, JSObje
84 UndefinedValue(), NULL, NULL,
85 JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_SHARED, 0, 0,
86 NULL)) {
87 - return JS_FALSE;
88 + return NULL;
89 }
91 return proto;
92 --- a/js/src/jstypedarray.cpp
93 +++ b/js/src/jstypedarray.cpp
94 @@ -1334,7 +1334,7 @@ class TypedArrayTemplate
95 if (size != 0 && count >= INT32_MAX / size) {
96 JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL,
97 JSMSG_NEED_DIET, "size and count");
98 - return false;
99 + return NULL;
100 }
102 int32 bytelen = size * count;
103 @@ -1668,7 +1668,7 @@ TypedArrayConstruct(JSContext *cx, jsint
105 default:
106 JS_NOT_REACHED("shouldn't have gotten here");
107 - return false;
108 + return NULL;
109 }
110 }
112 --- a/js/src/jsxml.cpp
113 +++ b/js/src/jsxml.cpp
114 @@ -282,7 +282,7 @@ NewXMLNamespace(JSContext *cx, JSLinearS
116 obj = NewBuiltinClassInstanceXML(cx, &js_NamespaceClass);
117 if (!obj)
118 - return JS_FALSE;
119 + return NULL;
120 JS_ASSERT(JSVAL_IS_VOID(obj->getNamePrefixVal()));
121 JS_ASSERT(JSVAL_IS_VOID(obj->getNameURIVal()));
122 JS_ASSERT(JSVAL_IS_VOID(obj->getNamespaceDeclared()));
123 @@ -431,7 +431,7 @@ ConvertQNameToString(JSContext *cx, JSOb
124 size_t length = str->length();
125 jschar *chars = (jschar *) cx->malloc((length + 2) * sizeof(jschar));
126 if (!chars)
127 - return JS_FALSE;
128 + return NULL;
129 *chars = '@';
130 const jschar *strChars = str->getChars(cx);
131 if (!strChars) {
132 --- a/js/src/methodjit/InvokeHelpers.cpp
133 +++ b/js/src/methodjit/InvokeHelpers.cpp
134 @@ -728,7 +728,7 @@ AtSafePoint(JSContext *cx)
135 {
136 JSStackFrame *fp = cx->fp();
137 if (fp->hasImacropc())
138 - return false;
139 + return NULL;
141 JSScript *script = fp->script();
142 return script->maybeNativeCodeForPC(fp->isConstructing(), cx->regs->pc);
143 --- a/js/src/nanojit/NativeX64.cpp
144 +++ b/js/src/nanojit/NativeX64.cpp
145 @@ -1899,7 +1899,7 @@ namespace nanojit
146 }
147 }
149 - static const AVMPLUS_ALIGN16(int64_t) negateMask[] = {0x8000000000000000LL,0};
150 + static const AVMPLUS_ALIGN16(int64_t) negateMask[] = {(int64_t) 0x8000000000000000ULL,0};
152 void Assembler::asm_fneg(LIns *ins) {
153 Register rr, ra;