Improve LLVM compatibility a little bit
This commit is contained in:
4
third_party/quickjs/quickjs-libc.c
vendored
4
third_party/quickjs/quickjs-libc.c
vendored
@@ -1463,7 +1463,7 @@ static textstartup void js_std_error_props_init() {
|
||||
DEF(EBADF),
|
||||
#undef DEF
|
||||
};
|
||||
_Static_assert(sizeof(js_std_error_props) == sizeof(props));
|
||||
_Static_assert(sizeof(js_std_error_props) == sizeof(props), "");
|
||||
memcpy(js_std_error_props, props, sizeof(props));
|
||||
}
|
||||
const void *const js_std_error_props_ctor[] initarray = {js_std_error_props_init};
|
||||
@@ -3592,7 +3592,7 @@ static textstartup void js_os_funcs_init() {
|
||||
JS_CFUNC_DEF("dup2", 2, js_os_dup2 ),
|
||||
#endif
|
||||
};
|
||||
_Static_assert(sizeof(js_os_funcs) == sizeof(funcs));
|
||||
_Static_assert(sizeof(js_os_funcs) == sizeof(funcs), "");
|
||||
memcpy(js_os_funcs, funcs, sizeof(funcs));
|
||||
}
|
||||
const void *const js_os_funcs_ctor[] initarray = {js_os_funcs_init};
|
||||
|
||||
2
third_party/quickjs/quickjs.c
vendored
2
third_party/quickjs/quickjs.c
vendored
@@ -10731,7 +10731,7 @@ static int JS_ToInt64SatFree(JSContext *ctx, int64_t *pres, JSValue val)
|
||||
} else {
|
||||
if (d < INT64_MIN)
|
||||
*pres = INT64_MIN;
|
||||
else if (d > INT64_MAX)
|
||||
else if (d > (double)INT64_MAX)
|
||||
*pres = INT64_MAX;
|
||||
else
|
||||
*pres = (int64_t)d;
|
||||
|
||||
6
third_party/regex/regerror.c
vendored
6
third_party/regex/regerror.c
vendored
@@ -47,7 +47,7 @@ static const char kRegexErrors[] =
|
||||
* @return number of bytes needed to hold entire string
|
||||
*/
|
||||
size_t regerror(int e, const regex_t *preg, char *buf, size_t size) {
|
||||
return 1 + snprintf(buf, size, "%s",
|
||||
firstnonnull(IndexDoubleNulString(kRegexErrors, e),
|
||||
"Unknown error"));
|
||||
return 1 + (snprintf)(buf, size, "%s",
|
||||
firstnonnull(IndexDoubleNulString(kRegexErrors, e),
|
||||
"Unknown error"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user