Skip to content

Commit b1500a2

Browse files
committed
Fix compilation error with GCC 15
``` quickjs.c:11727:32: error: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (37 chars into 36 available) [-Werror=unterminated-string-initialization] 11727 | static char const digits[36] = "0123456789abcdefghijklmnopqrstuvwxyz"; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ```
1 parent d75d2f9 commit b1500a2

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ jobs:
330330
- name: Setup MSYS2
331331
uses: msys2/setup-msys2@v2
332332
with:
333+
update: true
333334
msystem: ${{matrix.sys}}
334335
install: >-
335336
git

quickjs.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11724,7 +11724,12 @@ static JSBigInt *js_bigint_from_string(JSContext *ctx,
1172411724
}
1172511725

1172611726
/* 2 <= base <= 36 */
11727-
static char const digits[36] = "0123456789abcdefghijklmnopqrstuvwxyz";
11727+
static char const digits[36] = {
11728+
'0','1','2','3','4','5','6','7','8','9',
11729+
'a','b','c','d','e','f','g','h','i','j',
11730+
'k','l','m','n','o','p','q','r','s','t',
11731+
'u','v','w','x','y','z'
11732+
};
1172811733

1172911734
/* special version going backwards */
1173011735
/* XXX: use dtoa.c */

0 commit comments

Comments
 (0)