Skip to content

Instantly share code, notes, and snippets.

@saghul
Created April 11, 2024 07:38
Show Gist options
  • Save saghul/bc2aa4a4db058f4327ad1894bd360301 to your computer and use it in GitHub Desktop.
Save saghul/bc2aa4a4db058f4327ad1894bd360301 to your computer and use it in GitHub Desktop.
QuickJS on iOS build warnings
/Users/saghul/src/quickjs/quickjs.h:490:30: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'int32_t' (aka 'int')
[-Wshorten-64-to-32]
v = JS_NewInt32(ctx, val);
~~~~~~~~~~~ ^~~
/Users/saghul/src/quickjs/quickjs.h:541:12: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
return js_unlikely(JS_VALUE_GET_TAG(v) == JS_TAG_EXCEPTION);
~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs.h:38:31: note: expanded from macro 'js_unlikely'
#define js_unlikely(x) __builtin_expect(!!(x), 0)
^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs.h:546:12: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
return js_unlikely(JS_VALUE_GET_TAG(v) == JS_TAG_UNINITIALIZED);
~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs.h:38:31: note: expanded from macro 'js_unlikely'
#define js_unlikely(x) __builtin_expect(!!(x), 0)
^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs-libc.c:372:19: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
len = fwrite(dbuf.buf, 1, dbuf.size, fp);
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs-libc.c:1063:15: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
err = js_get_errno(pclose(s->f));
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs-libc.c:1066:15: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
err = js_get_errno(fclose(s->f));
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs-libc.c:1629:11: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
ret = js_get_errno(open(filename, flags, mode));
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs-libc.c:1640:11: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
ret = js_get_errno(close(fd));
~ ^~~~~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs-libc.c:1829:11: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
ret = js_get_errno(ret);
~ ^~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs-libc.c:1848:11: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
ret = js_get_errno(rename(oldpath, newpath));
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs-libc.c:2147:44: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'int' [-Wshorten-64-to-32]
min_delay = min_int(min_delay, delay);
~~~~~~~ ^~~~~
/Users/saghul/src/quickjs/quickjs-libc.c:2246:23: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
ret = read(ps->read_fd, buf, sizeof(buf));
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs-libc.c:2442:11: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
err = js_get_errno(chdir(target));
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs-libc.c:2466:11: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
ret = js_get_errno(mkdir(path, mode));
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs-libc.c:2649:15: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
ret = js_get_errno(utimes(path, times));
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs-libc.c:2680:15: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
ret = js_get_errno(nanosleep(&ts, NULL));
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs-libc.c:2737:11: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
err = js_get_errno(symlink(target, linkpath));
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs-libc.c:3008:22: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
int fd_max = sysconf(_SC_OPEN_MAX);
~~~~~~ ^~~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs-libc.c:3145:11: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
ret = js_get_errno(kill(pid, sig));
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs-libc.c:3157:11: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
ret = js_get_errno(dup(fd));
~ ^~~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs-libc.c:3171:11: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
ret = js_get_errno(dup2(fd, fd2));
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs-libc.c:3542:19: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
ret = write(ps->write_fd, &ch, 1);
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~
22 warnings generated.
CompileC /Users/saghul/src/quickjs/build/build/qjs.build/Release-iphoneos/Objects-normal/arm64/quickjs.o /Users/saghul/src/quickjs/quickjs.c normal arm64 c com.apple.compilers.llvm.clang.1_0.compiler (in target 'qjs' from project 'quickjs')
cd /Users/saghul/src/quickjs
/Applications/Xcode-15.2.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c -ivfsstatcache /var/folders/yp/pg24dxgs6pj040_b0l04qzmr0000gn/C/com.apple.DeveloperTools/15.2-15C500b/Xcode/SDKStatCaches.noindex/iphoneos17.2-21C52-d4853233c81beb1da90379997a312ef0.sdkstatcache -target arm64-apple-ios17.2 -fmessage-length\=182 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -fcolor-diagnostics -Wno-trigraphs -fpascal-strings -O3 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-implicit-fallthrough -DCMAKE_INTDIR\=\"Release-iphoneos\" -D_GNU_SOURCE -DBUILD_QJS_LIBC -isysroot /Applications/Xcode-15.2.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.2.sdk -fstrict-aliasing -Wdeprecated-declarations -Wno-sign-conversion -Wno-infinite-recursion -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-semicolon-before-method-body -I/Users/saghul/src/quickjs/build/Release-iphoneos/include -I/Users/saghul/src/quickjs -I/Users/saghul/src/quickjs/build/build/qjs.build/Release-iphoneos/DerivedSources-normal/arm64 -I/Users/saghul/src/quickjs/build/build/qjs.build/Release-iphoneos/DerivedSources/arm64 -I/Users/saghul/src/quickjs/build/build/qjs.build/Release-iphoneos/DerivedSources -F/Users/saghul/src/quickjs/build/Release-iphoneos -DNDEBUG -fvisibility\=hidden -Wall -Wno-implicit-fallthrough -Wno-sign-compare -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-variable -Wno-unused-but-set-variable -Wno-array-bounds -funsigned-char -std\=gnu11 -MMD -MT dependencies -MF /Users/saghul/src/quickjs/build/build/qjs.build/Release-iphoneos/Objects-normal/arm64/quickjs.d --serialize-diagnostics /Users/saghul/src/quickjs/build/build/qjs.build/Release-iphoneos/Objects-normal/arm64/quickjs.dia -c /Users/saghul/src/quickjs/quickjs.c -o /Users/saghul/src/quickjs/build/build/qjs.build/Release-iphoneos/Objects-normal/arm64/quickjs.o
In file included from /Users/saghul/src/quickjs/quickjs.c:45:
/Users/saghul/src/quickjs/quickjs.h:490:30: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'int32_t' (aka 'int')
[-Wshorten-64-to-32]
v = JS_NewInt32(ctx, val);
~~~~~~~~~~~ ^~~
/Users/saghul/src/quickjs/quickjs.h:541:12: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
return js_unlikely(JS_VALUE_GET_TAG(v) == JS_TAG_EXCEPTION);
~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs.h:38:31: note: expanded from macro 'js_unlikely'
#define js_unlikely(x) __builtin_expect(!!(x), 0)
^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs.h:546:12: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
return js_unlikely(JS_VALUE_GET_TAG(v) == JS_TAG_UNINITIALIZED);
~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs.h:38:31: note: expanded from macro 'js_unlikely'
#define js_unlikely(x) __builtin_expect(!!(x), 0)
^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:1306:25: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'int32_t' (aka 'int')
[-Wshorten-64-to-32]
return js_int32(v);
~~~~~~~~ ^
/Users/saghul/src/quickjs/quickjs.c:1608:12: warning: implicit conversion loses integer precision: 'long' to 'BOOL' (aka 'int') [-Wshorten-64-to-32]
return unlikely(sp < rt->stack_limit);
~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /Users/saghul/src/quickjs/quickjs.c:43:
/Users/saghul/src/quickjs/cutils.h:67:27: note: expanded from macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:1847:25: warning: implicit conversion loses integer precision: 'uintptr_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
return (uintptr_t)p >> 1;
~~~~~~ ~~~~~~~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:2426:21: warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
n = n64;
~ ^~~
/Users/saghul/src/quickjs/quickjs.c:2580:15: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
len = strlen(p);
~ ^~~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:3430:11: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
len = strlen(class_def->class_name);
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:3603:33: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
new_size = min_int(new_size + (slack >> s->is_wide_char), JS_STRING_LEN_MAX);
~~~~~~~ ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:3738:58: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
return string_buffer_write8(s, (const uint8_t *)str, strlen(str));
~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:3860:58: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
return js_new_string8(ctx, (const uint8_t *)buf, buf_len);
~~~~~~~~~~~~~~ ^~~~~~~
/Users/saghul/src/quickjs/quickjs.c:3862:40: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
if (string_buffer_init(ctx, b, buf_len))
~~~~~~~~~~~~~~~~~~ ^~~~~~~
/Users/saghul/src/quickjs/quickjs.c:3864:42: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
string_buffer_write8(b, p_start, len1);
~~~~~~~~~~~~~~~~~~~~ ^~~~
/Users/saghul/src/quickjs/quickjs.c:3870:48: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
c = unicode_from_utf8(p, p_end - p, &p_next);
~~~~~~~~~~~~~~~~~ ~~~~~~^~~
/Users/saghul/src/quickjs/quickjs.c:3915:12: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
len1 = strlen(str1);
~ ^~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:3916:12: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
len3 = strlen(str3);
~ ^~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:4056:22: warning: implicit conversion loses integer precision: 'long' to 'uint32_t' (aka 'unsigned int') [-Wshorten-64-to-32]
str_new->len = q - str_new->u.str8;
~ ~~^~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:4271:23: warning: implicit conversion loses integer precision: 'uintptr_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
h = shape_hash(1, (uintptr_t)proto);
~~~~~~~~~~ ^~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:5198:23: warning: implicit conversion loses integer precision: 'intptr_t' (aka 'long') to 'uint32_t' (aka 'unsigned int')
[-Wshorten-64-to-32]
*offset = i;
~ ^
/Users/saghul/src/quickjs/quickjs.c:6173:49: warning: implicit conversion loses integer precision: 'const size_t' (aka 'const unsigned long') to 'unsigned int'
[-Wshorten-64-to-32]
unsigned int size = object_types[i].size;
~~~~ ~~~~~~~~~~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:6176:38: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'unsigned int'
[-Wshorten-64-to-32]
unsigned int size1 = js_malloc_usable_size_rt(rt, p);
~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:6337:24: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
return ptr - buf;
~~~~~~ ~~~~^~~~~
/Users/saghul/src/quickjs/quickjs.c:6523:73: warning: implicit conversion loses integer precision: 'long' to 'uint32_t' (aka 'unsigned int') [-Wshorten-64-to-32]
sf->cur_pc - b->byte_code_buf - 1,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/Users/saghul/src/quickjs/quickjs.c:8025:47: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'uint32_t' (aka 'unsigned int')
[-Wshorten-64-to-32]
if (js_get_fast_array_element(ctx, p, idx, pval))
~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~
/Users/saghul/src/quickjs/quickjs.c:8055:47: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'uint32_t' (aka 'unsigned int')
[-Wshorten-64-to-32]
if (js_get_fast_array_element(ctx, p, idx, &val))
~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~
/Users/saghul/src/quickjs/quickjs.c:8180:31: warning: implicit conversion loses integer precision: 'long' to 'uint32_t' (aka 'unsigned int') [-Wshorten-64-to-32]
lpr_idx = lpr - get_shape_prop(sh);
~ ~~~~^~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:8859:60: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'int32_t' (aka 'int')
[-Wshorten-64-to-32]
return JS_SetPropertyValue(ctx, this_obj, js_int32(idx), val,
~~~~~~~~ ^~~
/Users/saghul/src/quickjs/quickjs.c:9049:29: warning: implicit conversion loses integer precision: 'long' to 'uint32_t' (aka 'unsigned int') [-Wshorten-64-to-32]
idx = *pprs - get_shape_prop(sh);
~ ~~~~~~^~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:9764:64: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'uint32_t' (aka 'unsigned int')
[-Wshorten-64-to-32]
return JS_DeleteProperty(ctx, obj, __JS_AtomFromUInt32(idx), flags);
~~~~~~~~~~~~~~~~~~~ ^~~
/Users/saghul/src/quickjs/quickjs.c:10064:14: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
return p - p_start;
~~~~~~ ~~^~~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:10285:13: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
len = p - p_start;
~ ~~^~~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:10826:27: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
res = lrint(d);
~ ^~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:15681:58: warning: implicit conversion loses integer precision: 'long' to 'int32_t' (aka 'int') [-Wshorten-64-to-32]
sp[0] = JS_NewCatchOffset(ctx, pc + diff - b->byte_code_buf);
~~~~~~~~~~~~~~~~~ ~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:15691:41: warning: implicit conversion loses integer precision: 'long' to 'int32_t' (aka 'int') [-Wshorten-64-to-32]
sp[0] = js_int32(pc + 4 - b->byte_code_buf);
~~~~~~~~ ~~~~~~~^~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:16330:39: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'int32_t' (aka 'int')
[-Wshorten-64-to-32]
sp[-2] = js_int32(r);
~~~~~~~~ ^
/Users/saghul/src/quickjs/quickjs.c:16359:36: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'int32_t' (aka 'int')
[-Wshorten-64-to-32]
*pv = js_int32(r);
~~~~~~~~ ^
/Users/saghul/src/quickjs/quickjs.c:16398:39: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'int32_t' (aka 'int')
[-Wshorten-64-to-32]
sp[-2] = js_int32(r);
~~~~~~~~ ^
/Users/saghul/src/quickjs/quickjs.c:16430:39: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'int32_t' (aka 'int')
[-Wshorten-64-to-32]
sp[-2] = js_int32(r);
~~~~~~~~ ^
/Users/saghul/src/quickjs/quickjs.c:19504:32: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
s->token.col_num = s->mark - s->eol;
~ ~~~~~~~~^~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:19518:25: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
int position = curp - s->buf_start;
~~~~~~~~ ~~~~~^~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:19584:53: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
c = unicode_from_utf8(p - 1, s->buf_end - p, &p_next);
~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~^~~
/Users/saghul/src/quickjs/quickjs.c:19788:49: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
c = unicode_from_utf8(p, s->buf_end - p, &p_next);
~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~^~~
/Users/saghul/src/quickjs/quickjs.c:19804:32: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
s->token.col_num = s->mark - s->eol;
~ ~~~~~~~~^~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:20005:31: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
fd->last_opcode_pos = bc->size;
~ ~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:20086:70: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
s->cur_func->label_slots[label].pos = s->cur_func->byte_code.size;
~ ~~~~~~~~~~~~~~~~~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:20087:44: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
return s->cur_func->byte_code.size - 4;
~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/Users/saghul/src/quickjs/quickjs.c:21538:39: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
ctor_cpool_offset = fd->byte_code.size;
~ ~~~~~~~~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:21880:38: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
ctor_fd->source_len = s->buf_ptr - class_start_ptr;
~ ~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:22480:41: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
start_addr = s->cur_func->byte_code.size;
~ ~~~~~~~~~~~~~~~~~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:22494:42: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
assign_addr = s->cur_func->byte_code.size;
~ ~~~~~~~~~~~~~~~~~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:24611:39: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
pos_next = s->cur_func->byte_code.size;
~ ~~~~~~~~~~~~~~~~~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:24674:39: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
pos_expr = s->cur_func->byte_code.size;
~ ~~~~~~~~~~~~~~~~~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:24743:31: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
int offset = bc->size - pos_next;
~~~~~~ ~~~~~~~~~^~~~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:24749:49: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
s->cur_func->last_opcode_pos = bc->size - 5;
~ ~~~~~~~~~^~~
/Users/saghul/src/quickjs/quickjs.c:25115:51: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
pos_cont = s->cur_func->byte_code.size;
~ ~~~~~~~~~~~~~~~~~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:25126:47: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
pos_body = s->cur_func->byte_code.size;
~ ~~~~~~~~~~~~~~~~~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:25139:39: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
int offset = bc->size - pos_cont;
~~~~~~ ~~~~~~~~~^~~~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:25145:57: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
s->cur_func->last_opcode_pos = bc->size - 5;
~ ~~~~~~~~~^~~
/Users/saghul/src/quickjs/quickjs.c:25254:69: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
default_label_pos = s->cur_func->byte_code.size - 4;
~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/Users/saghul/src/quickjs/quickjs.c:25803:17: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
len = p - base_name;
~ ~~^~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:25807:34: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
cap = len + strlen(name) + 1 + 1;
~ ~~~~~~~~~~~~~~~~~~~~~~~^~~
/Users/saghul/src/quickjs/quickjs.c:27435:67: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
free_bytecode_atoms(ctx->rt, fd->byte_code.buf, fd->byte_code.size,
~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:28652:47: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
s->label_slots[label_done].pos2 = bc->size;
~ ~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:29354:47: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
s->label_slots[label_next].pos2 = bc->size;
~ ~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:29444:39: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
cc.bc_len = bc_len = s->byte_code.size;
~ ~~~~~~~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:29629:40: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
ls->pos2 = bc_out.size + opcode_info[op].size;
~ ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:30014:39: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
cc.bc_len = bc_len = s->byte_code.size;
~ ~~~~~~~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:30112:35: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
ls->addr = bc_out.size;
~ ~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:30145:48: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
add_pc2line_info(s, bc_out.size, line_num, col_num);
~~~~~~~~~~~~~~~~ ~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:30151:44: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
add_pc2line_info(s, bc_out.size, line_num, col_num);
~~~~~~~~~~~~~~~~ ~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:30181:48: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
add_pc2line_info(s, bc_out.size, line_num, col_num);
~~~~~~~~~~~~~~~~ ~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:30229:40: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
add_pc2line_info(s, bc_out.size, line_num, col_num);
~~~~~~~~~~~~~~~~ ~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:30239:35: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
jp->pos = bc_out.size + 1;
~ ~~~~~~~~~~~~^~~
/Users/saghul/src/quickjs/quickjs.c:30249:57: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
if (!add_reloc(ctx, ls, bc_out.size - 1, 1))
~~~~~~~~~ ~~~~~~~~~~~~^~~
/Users/saghul/src/quickjs/quickjs.c:30258:57: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
if (!add_reloc(ctx, ls, bc_out.size - 2, 2))
~~~~~~~~~ ~~~~~~~~~~~~^~~
/Users/saghul/src/quickjs/quickjs.c:30263:51: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
int diff = ls->addr - bc_out.size - 1;
~~~~ ~~~~~~~~~~~~~~~~~~~~~~~^~~
/Users/saghul/src/quickjs/quickjs.c:30280:44: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
dbuf_put_u32(&bc_out, ls->addr - bc_out.size);
~~~~~~~~~~~~ ~~~~~~~~~^~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:30283:53: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
if (!add_reloc(ctx, ls, bc_out.size - 4, 4))
~~~~~~~~~ ~~~~~~~~~~~~^~~
/Users/saghul/src/quickjs/quickjs.c:30303:44: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
add_pc2line_info(s, bc_out.size, line_num, col_num);
~~~~~~~~~~~~~~~~ ~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:30307:39: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
jp->pos = bc_out.size + 5;
~ ~~~~~~~~~~~~^~~
/Users/saghul/src/quickjs/quickjs.c:30311:48: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
dbuf_put_u32(&bc_out, ls->addr - bc_out.size);
~~~~~~~~~~~~ ~~~~~~~~~^~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:30314:57: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
if (!add_reloc(ctx, ls, bc_out.size - 4, 4))
~~~~~~~~~ ~~~~~~~~~~~~^~~
/Users/saghul/src/quickjs/quickjs.c:30335:44: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
add_pc2line_info(s, bc_out.size, line_num, col_num);
~~~~~~~~~~~~~~~~ ~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:30344:44: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
add_pc2line_info(s, bc_out.size, line_num, col_num);
~~~~~~~~~~~~~~~~ ~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:30389:48: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
add_pc2line_info(s, bc_out.size, line_num, col_num);
~~~~~~~~~~~~~~~~ ~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:30407:40: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
add_pc2line_info(s, bc_out.size, line_num, col_num);
~~~~~~~~~~~~~~~~ ~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:30416:48: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
add_pc2line_info(s, bc_out.size, line_num, col_num);
~~~~~~~~~~~~~~~~ ~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:30429:48: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
add_pc2line_info(s, bc_out.size, line_num, col_num);
~~~~~~~~~~~~~~~~ ~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:30449:48: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
add_pc2line_info(s, bc_out.size, line_num, col_num);
~~~~~~~~~~~~~~~~ ~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:30478:44: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
add_pc2line_info(s, bc_out.size, line_num, col_num);
~~~~~~~~~~~~~~~~ ~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:30492:44: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
add_pc2line_info(s, bc_out.size, line_num, col_num);
~~~~~~~~~~~~~~~~ ~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:30501:44: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
add_pc2line_info(s, bc_out.size, line_num, col_num);
~~~~~~~~~~~~~~~~ ~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:30518:44: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
add_pc2line_info(s, bc_out.size, line_num, col_num);
~~~~~~~~~~~~~~~~ ~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:30547:48: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
add_pc2line_info(s, bc_out.size, line_num, col_num);
~~~~~~~~~~~~~~~~ ~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:30581:48: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
add_pc2line_info(s, bc_out.size, line_num, col_num);
~~~~~~~~~~~~~~~~ ~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:30593:48: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
add_pc2line_info(s, bc_out.size, line_num, col_num);
~~~~~~~~~~~~~~~~ ~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:30612:48: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
add_pc2line_info(s, bc_out.size, line_num, col_num);
~~~~~~~~~~~~~~~~ ~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:30627:48: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
add_pc2line_info(s, bc_out.size, line_num, col_num);
~~~~~~~~~~~~~~~~ ~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:30638:48: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
add_pc2line_info(s, bc_out.size, line_num, col_num);
~~~~~~~~~~~~~~~~ ~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:30643:44: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
add_pc2line_info(s, bc_out.size, line_num, col_num);
~~~~~~~~~~~~~~~~ ~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:30652:44: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
add_pc2line_info(s, bc_out.size, line_num, col_num);
~~~~~~~~~~~~~~~~ ~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:30666:48: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
add_pc2line_info(s, bc_out.size, line_num, col_num);
~~~~~~~~~~~~~~~~ ~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:30671:44: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
add_pc2line_info(s, bc_out.size, line_num, col_num);
~~~~~~~~~~~~~~~~ ~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:30698:48: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
add_pc2line_info(s, bc_out.size, line_num, col_num);
~~~~~~~~~~~~~~~~ ~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:30706:48: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
add_pc2line_info(s, bc_out.size, line_num, col_num);
~~~~~~~~~~~~~~~~ ~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:30716:48: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
add_pc2line_info(s, bc_out.size, line_num, col_num);
~~~~~~~~~~~~~~~~ ~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:30743:52: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
add_pc2line_info(s, bc_out.size, line_num, col_num);
~~~~~~~~~~~~~~~~ ~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:30753:52: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
add_pc2line_info(s, bc_out.size, line_num, col_num);
~~~~~~~~~~~~~~~~ ~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:30767:40: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
add_pc2line_info(s, bc_out.size, line_num, col_num);
~~~~~~~~~~~~~~~~ ~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:30940:31: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
s->bc_len = fd->byte_code.size;
~ ~~~~~~~~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:31271:38: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
b->byte_code_len = fd->byte_code.size;
~ ~~~~~~~~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:31309:34: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
b->pc2line_len = fd->pc2line.size;
~ ~~~~~~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:31987:42: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
fd->source_len = s->last_ptr - ptr;
~ ~~~~~~~~~~~~^~~~~
/Users/saghul/src/quickjs/quickjs.c:32014:33: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
fd->source_len = s->buf_ptr - ptr;
~ ~~~~~~~~~~~^~~~~
/Users/saghul/src/quickjs/quickjs.c:32205:39: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
s->mark = s->buf_ptr + min_int(1, input_len);
~~~~~~~ ^~~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:32869:23: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'int32_t' (aka 'int')
[-Wshorten-64-to-32]
bc_put_sleb128(s, e);
~~~~~~~~~~~~~~ ^
/Users/saghul/src/quickjs/quickjs.c:32889:26: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
bc_put_leb128(s, len);
~~~~~~~~~~~~~ ^~~
/Users/saghul/src/quickjs/quickjs.c:33338:26: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
atoms_size = s->dbuf.size;
~ ~~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:34565:28: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
len = strlen(name) - 1;
~ ~~~~~~~~~~~~~^~~
/Users/saghul/src/quickjs/quickjs.c:36821:36: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'int32_t' (aka 'int')
[-Wshorten-64-to-32]
args[1] = js_int32(k);
~~~~~~~~ ^
/Users/saghul/src/quickjs/quickjs.c:36854:36: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'int32_t' (aka 'int')
[-Wshorten-64-to-32]
args[1] = js_int32(k);
~~~~~~~~ ^
/Users/saghul/src/quickjs/quickjs.c:36866:58: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
if (JS_SetProperty(ctx, r, JS_ATOM_length, js_uint32(k)) < 0)
~~~~~~~~~ ^
/Users/saghul/src/quickjs/quickjs.c:37060:35: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
if (expand_fast_array(ctx, p, len) < 0)
~~~~~~~~~~~~~~~~~ ^~~
/Users/saghul/src/quickjs/quickjs.c:37062:24: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
p->u.array.count = len;
~ ^~~
/Users/saghul/src/quickjs/quickjs.c:37229:28: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'int32_t' (aka 'int')
[-Wshorten-64-to-32]
args[1] = js_int32(len);
~~~~~~~~ ^~~
/Users/saghul/src/quickjs/quickjs.c:37285:60: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'int32_t' (aka 'int')
[-Wshorten-64-to-32]
if (JS_SetPropertyValue(ctx, ret, js_int32(k), res, JS_PROP_THROW) < 0)
~~~~~~~~ ^
/Users/saghul/src/quickjs/quickjs.c:37308:28: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'int32_t' (aka 'int')
[-Wshorten-64-to-32]
args[1] = js_int32(n);
~~~~~~~~ ^
/Users/saghul/src/quickjs/quickjs.c:37499:20: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'int' [-Wshorten-64-to-32]
return js_bool(res);
~~~~~~~ ^~~
/Users/saghul/src/quickjs/quickjs.c:37737:45: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
el = JS_GetPropertyUint32(ctx, obj, i);
~~~~~~~~~~~~~~~~~~~~ ^
/Users/saghul/src/quickjs/quickjs.c:37947:39: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
if (expand_fast_array(ctx, p, len) < 0)
~~~~~~~~~~~~~~~~~ ^~~
/Users/saghul/src/quickjs/quickjs.c:37949:28: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
p->u.array.count = len;
~ ^~~
/Users/saghul/src/quickjs/quickjs.c:38139:35: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
if (expand_fast_array(ctx, p, newlen) < 0)
~~~~~~~~~~~~~~~~~ ^~~~~~
/Users/saghul/src/quickjs/quickjs.c:38142:24: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
p->u.array.count = newlen;
~ ^~~~~~
/Users/saghul/src/quickjs/quickjs.c:38519:39: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
if (expand_fast_array(ctx, p, len) < 0)
~~~~~~~~~~~~~~~~~ ^~~
/Users/saghul/src/quickjs/quickjs.c:38521:28: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
p->u.array.count = len;
~ ^~~
/Users/saghul/src/quickjs/quickjs.c:40099:36: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'int' [-Wshorten-64-to-32]
e = string_indexof(sp, rp, q);
~~~~~~~~~~~~~~ ^
/Users/saghul/src/quickjs/quickjs.c:40102:39: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'int' [-Wshorten-64-to-32]
T = js_sub_string(ctx, sp, p, e);
~~~~~~~~~~~~~ ^
/Users/saghul/src/quickjs/quickjs.c:40102:36: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'int' [-Wshorten-64-to-32]
T = js_sub_string(ctx, sp, p, e);
~~~~~~~~~~~~~ ^
/Users/saghul/src/quickjs/quickjs.c:40111:35: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'int' [-Wshorten-64-to-32]
T = js_sub_string(ctx, sp, p, s);
~~~~~~~~~~~~~ ^
/Users/saghul/src/quickjs/quickjs.c:40111:32: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'int' [-Wshorten-64-to-32]
T = js_sub_string(ctx, sp, p, s);
~~~~~~~~~~~~~ ^
/Users/saghul/src/quickjs/quickjs.c:40307:9: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'int' [-Wshorten-64-to-32]
n = val;
~ ^~~
/Users/saghul/src/quickjs/quickjs.c:41137:26: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
return -tm.tm_gmtoff / 60;
~~~~~~ ~~~~~~~~~~~~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:41637:32: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'int' [-Wshorten-64-to-32]
str_buf, last_index, str->len,
^~~~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:41655:64: warning: implicit conversion loses integer precision: 'long' to 'int32_t' (aka 'int') [-Wshorten-64-to-32]
js_int32((capture[1] - str_buf) >> shift)) < 0)
~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:41691:46: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
start = (match[0] - str_buf) >> shift;
~ ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:41692:44: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
end = (match[1] - str_buf) >> shift;
~ ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:41754:45: warning: implicit conversion loses integer precision: 'long' to 'int32_t' (aka 'int') [-Wshorten-64-to-32]
t = js_int32((capture[0] - str_buf) >> shift);
~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:41834:33: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'int' [-Wshorten-64-to-32]
str_buf, last_index, str->len, shift, ctx);
^~~~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:41848:40: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
start = (capture[0] - str_buf) >> shift;
~ ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:41849:38: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
end = (capture[1] - str_buf) >> shift;
~ ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:42369:69: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'int32_t' (aka 'int')
[-Wshorten-64-to-32]
if (JS_DefinePropertyValueInt64(ctx, tab, n++, js_int32(position), JS_PROP_C_W_E | JS_PROP_THROW) < 0)
~~~~~~~~ ^~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:42392:32: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'int32_t' (aka 'int')
[-Wshorten-64-to-32]
args[2] = js_int32(position);
~~~~~~~~ ^~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:42403:61: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
string_buffer_concat(b, sp, nextSourcePosition, position);
~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:42405:43: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'int' [-Wshorten-64-to-32]
nextSourcePosition = position + JS_VALUE_GET_STRING(matched)->len;
~ ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:42558:17: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
q = string_advance_index(strp, q, unicodeMatching);
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:42565:21: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
q = string_advance_index(strp, q, unicodeMatching);
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:42575:21: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
p = e;
~ ^
/Users/saghul/src/quickjs/quickjs.c:44735:46: warning: implicit conversion loses integer precision: 'uintptr_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
h = (uintptr_t)JS_VALUE_GET_PTR(key) * 3163;
~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/Users/saghul/src/quickjs/quickjs.c:48687:25: warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'int'
[-Wshorten-64-to-32]
abuf->byte_length = len;
~ ^~~
/Users/saghul/src/quickjs/quickjs.c:48692:58: warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'int'
[-Wshorten-64-to-32]
max_int(len, 1));
~~~~~~~ ^~~
/Users/saghul/src/quickjs/quickjs.c:48698:50: warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'int'
[-Wshorten-64-to-32]
abuf->data = js_mallocz(ctx, max_int(len, 1));
~~~~~~~ ^~~
/Users/saghul/src/quickjs/quickjs.c:49324:58: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
} else if (JS_SetPropertyUint32(ctx, dst, offset + i, val) < 0) {
~~~~~~~~~~~~~~~~~~~~ ~~~~~~~^~~
/Users/saghul/src/quickjs/quickjs.c:49583:32: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'int32_t' (aka 'int')
[-Wshorten-64-to-32]
args[1] = js_int32(k);
~~~~~~~~ ^
/Users/saghul/src/quickjs/quickjs.c:49737:42: warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
p->u.array.u.uint32_ptr[k] = v64;
~ ^~~
/Users/saghul/src/quickjs/quickjs.c:49922:30: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
res = pp - pv;
~ ~~~^~~~
/Users/saghul/src/quickjs/quickjs.c:49962:17: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
v = v64;
~ ^~~
/Users/saghul/src/quickjs/quickjs.c:50536:32: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
array_idx[i] = i;
~ ^
/Users/saghul/src/quickjs/quickjs.c:50538:28: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
tsc.elt_size = elt_size;
~ ^~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:50684:18: warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
ta->offset = offset;
~ ^~~~~~
/Users/saghul/src/quickjs/quickjs.c:50685:22: warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
ta->length = len << size_log2;
~ ~~~~^~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:50688:24: warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
p->u.array.count = len;
~ ^~~
/Users/saghul/src/quickjs/quickjs.c:50963:29: warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
len = abuf->byte_length - offset;
~ ~~~~~~~~~~~~~~~~~~^~~~~~~~
/Users/saghul/src/quickjs/quickjs.c:50970:15: warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
len = l;
~ ^
/Users/saghul/src/quickjs/quickjs.c:50990:18: warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
ta->offset = offset;
~ ^~~~~~
/Users/saghul/src/quickjs/quickjs.c:51421:27: warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
uint32_t v1 = v;
~~ ^
/Users/saghul/src/quickjs/quickjs.c:51452:24: warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'int32_t'
(aka 'int') [-Wshorten-64-to-32]
ret = js_int32(a);
~~~~~~~~ ^
/Users/saghul/src/quickjs/quickjs.c:51455:25: warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
ret = js_uint32(a);
~~~~~~~~~ ^
/Users/saghul/src/quickjs/quickjs.c:52385:65: warning: implicit conversion loses integer precision: 'long' to 'uint32_t' (aka 'unsigned int')
[-Wshorten-64-to-32]
sf->cur_pc - b->byte_code_buf - 1,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
179 warnings generated.
CompileC /Users/saghul/src/quickjs/build/build/qjs.build/Release-iphoneos/Objects-normal/arm64/libbf.o /Users/saghul/src/quickjs/libbf.c normal arm64 c com.apple.compilers.llvm.clang.1_0.compiler (in target 'qjs' from project 'quickjs')
cd /Users/saghul/src/quickjs
/Applications/Xcode-15.2.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c -ivfsstatcache /var/folders/yp/pg24dxgs6pj040_b0l04qzmr0000gn/C/com.apple.DeveloperTools/15.2-15C500b/Xcode/SDKStatCaches.noindex/iphoneos17.2-21C52-d4853233c81beb1da90379997a312ef0.sdkstatcache -target arm64-apple-ios17.2 -fmessage-length\=182 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -fcolor-diagnostics -Wno-trigraphs -fpascal-strings -O3 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-implicit-fallthrough -DCMAKE_INTDIR\=\"Release-iphoneos\" -D_GNU_SOURCE -DBUILD_QJS_LIBC -isysroot /Applications/Xcode-15.2.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.2.sdk -fstrict-aliasing -Wdeprecated-declarations -Wno-sign-conversion -Wno-infinite-recursion -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-semicolon-before-method-body -I/Users/saghul/src/quickjs/build/Release-iphoneos/include -I/Users/saghul/src/quickjs -I/Users/saghul/src/quickjs/build/build/qjs.build/Release-iphoneos/DerivedSources-normal/arm64 -I/Users/saghul/src/quickjs/build/build/qjs.build/Release-iphoneos/DerivedSources/arm64 -I/Users/saghul/src/quickjs/build/build/qjs.build/Release-iphoneos/DerivedSources -F/Users/saghul/src/quickjs/build/Release-iphoneos -DNDEBUG -fvisibility\=hidden -Wall -Wno-implicit-fallthrough -Wno-sign-compare -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-variable -Wno-unused-but-set-variable -Wno-array-bounds -funsigned-char -std\=gnu11 -MMD -MT dependencies -MF /Users/saghul/src/quickjs/build/build/qjs.build/Release-iphoneos/Objects-normal/arm64/libbf.d --serialize-diagnostics /Users/saghul/src/quickjs/build/build/qjs.build/Release-iphoneos/Objects-normal/arm64/libbf.dia -c /Users/saghul/src/quickjs/libbf.c -o /Users/saghul/src/quickjs/build/build/qjs.build/Release-iphoneos/Objects-normal/arm64/libbf.o
/Users/saghul/src/quickjs/libbf.c:439:21: warning: implicit conversion loses integer precision: 'limb_t' (aka 'unsigned long long') to 'int' [-Wshorten-64-to-32]
get_bit(r->tab, l, l * LIMB_BITS - 1 - (prec - 1));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/libbf.c:453:19: warning: implicit conversion loses integer precision: 'limb_t' (aka 'unsigned long long') to 'int' [-Wshorten-64-to-32]
add_one = bit1;
~ ^~~~
/Users/saghul/src/quickjs/libbf.c:861:56: warning: implicit conversion loses integer precision: 'slimb_t' (aka 'long long') to 'int' [-Wshorten-64-to-32]
p1 = bf_min(clz(v1 & mask), clz((~v2) & mask)) - (LIMB_BITS - p);
~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/libbf.c:873:18: warning: implicit conversion loses integer precision: 'slimb_t' (aka 'long long') to 'int' [-Wshorten-64-to-32]
p1 = bf_min(clz(v1), clz(~v2));
~ ^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/libbf.c:2405:15: warning: implicit conversion loses integer precision: 'limb_t' (aka 'unsigned long long') to 'int'
[-Wshorten-64-to-32]
r->sign = r_sign;
~ ^~~~~~
/Users/saghul/src/quickjs/libbf.c:2473:32: warning: implicit conversion loses integer precision: 'slimb_t' (aka 'long long') to 'int' [-Wshorten-64-to-32]
e = b->expn + 1023 - 1;
~ ~~~~~~~~~~~~~~~^~~
/Users/saghul/src/quickjs/libbf.c:2566:32: warning: implicit conversion loses integer precision: 'limb_t' (aka 'unsigned long long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
v = a->tab[a->len - 1] >> (LIMB_BITS - a->expn);
~ ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/libbf.c:2582:13: warning: implicit conversion loses integer precision: 'limb_t' (aka 'unsigned long long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
v = get_bits(a->tab, a->len, a->len * LIMB_BITS - a->expn);
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/libbf.c:2756:29: warning: implicit conversion loses integer precision: 'limb_t' (aka 'unsigned long long') to 'int'
[-Wshorten-64-to-32]
radixl = get_limb_radix(radix);
~~~~~~~~~~~~~~ ^~~~~
/Users/saghul/src/quickjs/libbf.c:3675:47: warning: implicit conversion loses integer precision: 'limb_t' (aka 'unsigned long long') to 'int'
[-Wshorten-64-to-32]
first_buf_pos = pos * digits_per_limb - n_digits;
~ ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
/Users/saghul/src/quickjs/libbf.c:5943:35: warning: implicit conversion loses integer precision: 'limb_t' (aka 'unsigned long long') to 'int'
[-Wshorten-64-to-32]
fast_shr_rem_dec(q, r, a, shift);
~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/Users/saghul/src/quickjs/libbf.c:5559:62: note: expanded from macro 'fast_shr_rem_dec'
#define fast_shr_rem_dec(q, r, a, shift) q = fast_shr_dec(a, shift), r = a - q * mp_pow_dec[shift]
~~~~~~~~~~~~ ^~~~~
/Users/saghul/src/quickjs/libbf.c:5961:47: warning: implicit conversion loses integer precision: 'limb_t' (aka 'unsigned long long') to 'int'
[-Wshorten-64-to-32]
fast_shr_rem_dec(q, r, a, LIMB_DIGITS - shift);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
/Users/saghul/src/quickjs/libbf.c:5559:62: note: expanded from macro 'fast_shr_rem_dec'
#define fast_shr_rem_dec(q, r, a, shift) q = fast_shr_dec(a, shift), r = a - q * mp_pow_dec[shift]
~~~~~~~~~~~~ ^~~~~
/Users/saghul/src/quickjs/libbf.c:6321:17: warning: implicit conversion loses integer precision: 'slimb_t' (aka 'long long') to 'int' [-Wshorten-64-to-32]
shift = pos - i * LIMB_DIGITS;
~ ~~~~^~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/libbf.c:6467:17: warning: implicit conversion loses integer precision: 'limb_t' (aka 'unsigned long long') to 'int'
[-Wshorten-64-to-32]
shift = smod(bit_pos, LIMB_DIGITS);
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/libbf.c:7140:13: warning: implicit conversion loses integer precision: 'limb_t' (aka 'unsigned long long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
v = fast_shr_dec(a->tab[a->len - 1], LIMB_DIGITS - a->expn);
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/libbf.c:7140:58: warning: implicit conversion loses integer precision: 'slimb_t' (aka 'long long') to 'int' [-Wshorten-64-to-32]
v = fast_shr_dec(a->tab[a->len - 1], LIMB_DIGITS - a->expn);
~~~~~~~~~~~~ ~~~~~~~~~~~~^~~~~~~~~
/Users/saghul/src/quickjs/libbf.c:7148:59: warning: implicit conversion loses integer precision: 'slimb_t' (aka 'long long') to 'int' [-Wshorten-64-to-32]
v1 = fast_shr_dec(a->tab[a->len - 1], LIMB_DIGITS - a->expn);
~~~~~~~~~~~~ ~~~~~~~~~~~~^~~~~~~~~
/Users/saghul/src/quickjs/libbf.c:7158:17: warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
v = v1;
~ ^~
/Users/saghul/src/quickjs/libbf.c:7862:55: warning: implicit conversion loses integer precision: 'limb_t' (aka 'unsigned long long') to 'int'
[-Wshorten-64-to-32]
if (ntt_fft(s, buf1, buf1, buf3, k1, inverse, m_idx))
~~~~~~~ ^~~~~
/Users/saghul/src/quickjs/libbf.c:7883:81: warning: implicit conversion loses integer precision: 'limb_t' (aka 'unsigned long long') to 'int'
[-Wshorten-64-to-32]
if (ntt_fft(s, buf2 + l * n1, buf2 + l * n1, buf3, k1, inverse, m_idx))
~~~~~~~ ^~~~~
/Users/saghul/src/quickjs/libbf.c:7918:14: warning: implicit conversion loses integer precision: 'slimb_t' (aka 'long long') to 'int' [-Wshorten-64-to-32]
k1 = bf_min(k / 2, NTT_TRIG_K_MAX);
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/libbf.c:7929:46: warning: implicit conversion loses integer precision: 'limb_t' (aka 'unsigned long long') to 'int'
[-Wshorten-64-to-32]
ntt_vec_mul(s, buf1, buf2, k, k_tot, m_idx);
~~~~~~~~~~~ ^~~~~
/Users/saghul/src/quickjs/libbf.c:8266:15: warning: implicit conversion loses integer precision: 'slimb_t' (aka 'long long') to 'int' [-Wshorten-64-to-32]
dpl = bf_min((int_bits - 4) / 2,
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~
23 warnings generated.
WriteAuxiliaryFile /Users/saghul/src/quickjs/build/build/qjs.build/Release-iphoneos/Objects-normal/arm64/qjs.LinkFileList (in target 'qjs' from project 'quickjs')
cd /Users/saghul/src/quickjs
write-file /Users/saghul/src/quickjs/build/build/qjs.build/Release-iphoneos/Objects-normal/arm64/qjs.LinkFileList
CompileC /Users/saghul/src/quickjs/build/build/qjs.build/Release-iphoneos/Objects-normal/arm64/libunicode.o /Users/saghul/src/quickjs/libunicode.c normal arm64 c com.apple.compilers.llvm.clang.1_0.compiler (in target 'qjs' from project 'quickjs')
cd /Users/saghul/src/quickjs
/Applications/Xcode-15.2.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c -ivfsstatcache /var/folders/yp/pg24dxgs6pj040_b0l04qzmr0000gn/C/com.apple.DeveloperTools/15.2-15C500b/Xcode/SDKStatCaches.noindex/iphoneos17.2-21C52-d4853233c81beb1da90379997a312ef0.sdkstatcache -target arm64-apple-ios17.2 -fmessage-length\=182 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -fcolor-diagnostics -Wno-trigraphs -fpascal-strings -O3 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-implicit-fallthrough -DCMAKE_INTDIR\=\"Release-iphoneos\" -D_GNU_SOURCE -DBUILD_QJS_LIBC -isysroot /Applications/Xcode-15.2.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.2.sdk -fstrict-aliasing -Wdeprecated-declarations -Wno-sign-conversion -Wno-infinite-recursion -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-semicolon-before-method-body -I/Users/saghul/src/quickjs/build/Release-iphoneos/include -I/Users/saghul/src/quickjs -I/Users/saghul/src/quickjs/build/build/qjs.build/Release-iphoneos/DerivedSources-normal/arm64 -I/Users/saghul/src/quickjs/build/build/qjs.build/Release-iphoneos/DerivedSources/arm64 -I/Users/saghul/src/quickjs/build/build/qjs.build/Release-iphoneos/DerivedSources -F/Users/saghul/src/quickjs/build/Release-iphoneos -DNDEBUG -fvisibility\=hidden -Wall -Wno-implicit-fallthrough -Wno-sign-compare -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-variable -Wno-unused-but-set-variable -Wno-array-bounds -funsigned-char -std\=gnu11 -MMD -MT dependencies -MF /Users/saghul/src/quickjs/build/build/qjs.build/Release-iphoneos/Objects-normal/arm64/libunicode.d --serialize-diagnostics /Users/saghul/src/quickjs/build/build/qjs.build/Release-iphoneos/Objects-normal/arm64/libunicode.dia -c /Users/saghul/src/quickjs/libunicode.c -o /Users/saghul/src/quickjs/build/build/qjs.build/Release-iphoneos/Objects-normal/arm64/libunicode.o
/Users/saghul/src/quickjs/libunicode.c:874:26: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
buf_len = dbuf->size / sizeof(int);
~ ~~~~~~~~~~~^~~~~~~~~~~~~
/Users/saghul/src/quickjs/libunicode.c:1337:31: warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
gc_mask = (uint64_t)1 << gc_idx;
~ ~~~~~~~~~~~~^~~~~~~~~
2 warnings generated.
CompileC /Users/saghul/src/quickjs/build/build/qjs.build/Release-iphoneos/Objects-normal/arm64/cutils.o /Users/saghul/src/quickjs/cutils.c normal arm64 c com.apple.compilers.llvm.clang.1_0.compiler (in target 'qjs' from project 'quickjs')
cd /Users/saghul/src/quickjs
/Applications/Xcode-15.2.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c -ivfsstatcache /var/folders/yp/pg24dxgs6pj040_b0l04qzmr0000gn/C/com.apple.DeveloperTools/15.2-15C500b/Xcode/SDKStatCaches.noindex/iphoneos17.2-21C52-d4853233c81beb1da90379997a312ef0.sdkstatcache -target arm64-apple-ios17.2 -fmessage-length\=182 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -fcolor-diagnostics -Wno-trigraphs -fpascal-strings -O3 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-implicit-fallthrough -DCMAKE_INTDIR\=\"Release-iphoneos\" -D_GNU_SOURCE -DBUILD_QJS_LIBC -isysroot /Applications/Xcode-15.2.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.2.sdk -fstrict-aliasing -Wdeprecated-declarations -Wno-sign-conversion -Wno-infinite-recursion -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-semicolon-before-method-body -I/Users/saghul/src/quickjs/build/Release-iphoneos/include -I/Users/saghul/src/quickjs -I/Users/saghul/src/quickjs/build/build/qjs.build/Release-iphoneos/DerivedSources-normal/arm64 -I/Users/saghul/src/quickjs/build/build/qjs.build/Release-iphoneos/DerivedSources/arm64 -I/Users/saghul/src/quickjs/build/build/qjs.build/Release-iphoneos/DerivedSources -F/Users/saghul/src/quickjs/build/Release-iphoneos -DNDEBUG -fvisibility\=hidden -Wall -Wno-implicit-fallthrough -Wno-sign-compare -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-variable -Wno-unused-but-set-variable -Wno-array-bounds -funsigned-char -std\=gnu11 -MMD -MT dependencies -MF /Users/saghul/src/quickjs/build/build/qjs.build/Release-iphoneos/Objects-normal/arm64/cutils.d --serialize-diagnostics /Users/saghul/src/quickjs/build/build/qjs.build/Release-iphoneos/Objects-normal/arm64/cutils.dia -c /Users/saghul/src/quickjs/cutils.c -o /Users/saghul/src/quickjs/build/build/qjs.build/Release-iphoneos/Objects-normal/arm64/cutils.o
/Users/saghul/src/quickjs/cutils.c:63:11: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
len = strlen(buf);
~ ^~~~~~~~~~~
/Users/saghul/src/quickjs/cutils.c:250:14: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
return q - buf;
~~~~~~ ~~^~~~~
2 warnings generated.
CompileC /Users/saghul/src/quickjs/build/build/qjs.build/Release-iphoneos/Objects-normal/arm64/libregexp.o /Users/saghul/src/quickjs/libregexp.c normal arm64 c com.apple.compilers.llvm.clang.1_0.compiler (in target 'qjs' from project 'quickjs')
cd /Users/saghul/src/quickjs
/Applications/Xcode-15.2.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c -ivfsstatcache /var/folders/yp/pg24dxgs6pj040_b0l04qzmr0000gn/C/com.apple.DeveloperTools/15.2-15C500b/Xcode/SDKStatCaches.noindex/iphoneos17.2-21C52-d4853233c81beb1da90379997a312ef0.sdkstatcache -target arm64-apple-ios17.2 -fmessage-length\=182 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -fcolor-diagnostics -Wno-trigraphs -fpascal-strings -O3 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-implicit-fallthrough -DCMAKE_INTDIR\=\"Release-iphoneos\" -D_GNU_SOURCE -DBUILD_QJS_LIBC -isysroot /Applications/Xcode-15.2.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.2.sdk -fstrict-aliasing -Wdeprecated-declarations -Wno-sign-conversion -Wno-infinite-recursion -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-semicolon-before-method-body -I/Users/saghul/src/quickjs/build/Release-iphoneos/include -I/Users/saghul/src/quickjs -I/Users/saghul/src/quickjs/build/build/qjs.build/Release-iphoneos/DerivedSources-normal/arm64 -I/Users/saghul/src/quickjs/build/build/qjs.build/Release-iphoneos/DerivedSources/arm64 -I/Users/saghul/src/quickjs/build/build/qjs.build/Release-iphoneos/DerivedSources -F/Users/saghul/src/quickjs/build/Release-iphoneos -DNDEBUG -fvisibility\=hidden -Wall -Wno-implicit-fallthrough -Wno-sign-compare -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-variable -Wno-unused-but-set-variable -Wno-array-bounds -funsigned-char -std\=gnu11 -MMD -MT dependencies -MF /Users/saghul/src/quickjs/build/build/qjs.build/Release-iphoneos/Objects-normal/arm64/libregexp.d --serialize-diagnostics /Users/saghul/src/quickjs/build/build/qjs.build/Release-iphoneos/Objects-normal/arm64/libregexp.dia -c /Users/saghul/src/quickjs/libregexp.c -o /Users/saghul/src/quickjs/build/build/qjs.build/Release-iphoneos/Objects-normal/arm64/libregexp.o
/Users/saghul/src/quickjs/libregexp.c:407:24: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
pos = s->byte_code.size;
~ ~~~~~~~~~~~~~^~~~
/Users/saghul/src/quickjs/libregexp.c:416:24: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
pos = s->byte_code.size;
~ ~~~~~~~~~~~~~^~~~
/Users/saghul/src/quickjs/libregexp.c:471:12: warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'int'
[-Wshorten-64-to-32]
return v;
~~~~~~ ^
/Users/saghul/src/quickjs/libregexp.c:1275:40: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
last_atom_start = s->byte_code.size;
~ ~~~~~~~~~~~~~^~~~
/Users/saghul/src/quickjs/libregexp.c:1313:48: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
last_atom_start = s->byte_code.size;
~ ~~~~~~~~~~~~~^~~~
/Users/saghul/src/quickjs/libregexp.c:1337:52: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
last_atom_start = s->byte_code.size;
~ ~~~~~~~~~~~~~^~~~
/Users/saghul/src/quickjs/libregexp.c:1351:67: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
put_u32(s->byte_code.buf + pos, s->byte_code.size - (pos + 4));
~~~~~~~ ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
/Users/saghul/src/quickjs/libregexp.c:1377:44: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
last_atom_start = s->byte_code.size;
~ ~~~~~~~~~~~~~^~~~
/Users/saghul/src/quickjs/libregexp.c:1486:48: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
last_atom_start = s->byte_code.size;
~ ~~~~~~~~~~~~~^~~~
/Users/saghul/src/quickjs/libregexp.c:1496:40: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
last_atom_start = s->byte_code.size;
~ ~~~~~~~~~~~~~^~~~
/Users/saghul/src/quickjs/libregexp.c:1516:40: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
last_atom_start = s->byte_code.size;
~ ~~~~~~~~~~~~~^~~~
/Users/saghul/src/quickjs/libregexp.c:1611:68: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
s->byte_code.size - last_atom_start);
~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/libregexp.c:1620:69: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
s->byte_code.size - last_atom_start - 17);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
/Users/saghul/src/quickjs/libregexp.c:1635:78: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
s->byte_code.size - last_atom_start) == 0);
~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/libregexp.c:1642:41: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
len = s->byte_code.size - last_atom_start;
~ ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/libregexp.c:1708:44: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
pos = s->byte_code.size;
~ ~~~~~~~~~~~~~^~~~
/Users/saghul/src/quickjs/libregexp.c:1721:44: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
pos = s->byte_code.size;
~ ~~~~~~~~~~~~~^~~~
/Users/saghul/src/quickjs/libregexp.c:1785:26: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
start = s->byte_code.size;
~ ~~~~~~~~~~~~~^~~~
/Users/saghul/src/quickjs/libregexp.c:1791:33: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
len = s->byte_code.size - start;
~ ~~~~~~~~~~~~~~~~~~^~~~~~~
/Users/saghul/src/quickjs/libregexp.c:1806:33: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
len = s->byte_code.size - (pos + 4);
~ ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
/Users/saghul/src/quickjs/libregexp.c:1926:68: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
stack_size = compute_stack_size(s->byte_code.buf, s->byte_code.size);
~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~^~~~
/Users/saghul/src/quickjs/libregexp.c:1935:31: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t'
(aka 'unsigned int') [-Wshorten-64-to-32]
s->byte_code.size - RE_HEADER_LEN);
~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/libregexp.c:1950:26: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
*plen = s->byte_code.size;
~ ~~~~~~~~~~~~~^~~~
/Users/saghul/src/quickjs/libregexp.c:2571:11: warning: implicit conversion loses integer precision: 'intptr_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
ret = lre_exec_backtrack(s, capture, stack_buf, 0, bc_buf + RE_HEADER_LEN,
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24 warnings generated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment