mirror of
https://github.com/DoneJS-Runtime/quickjs-done-nextgen.git
synced 2025-01-09 17:43:15 +00:00
Fix -Wunterminated-string-initialization warning (#787)
Unbreaks the Cygwin build.
This commit is contained in:
parent
1b957f71e3
commit
6e434008f5
2 changed files with 14 additions and 3 deletions
8
cutils.c
8
cutils.c
|
@ -590,7 +590,13 @@ overflow:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* 2 <= base <= 36 */
|
/* 2 <= base <= 36 */
|
||||||
char const digits36[36] = "0123456789abcdefghijklmnopqrstuvwxyz";
|
char const digits36[36] = {
|
||||||
|
'0','1','2','3','4','5','6','7','8','9',
|
||||||
|
'a','b','c','d','e','f','g','h','i','j',
|
||||||
|
'k','l','m','n','o','p','q','r','s','t',
|
||||||
|
'u','v','w','x','y','z'
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
#define USE_SPECIAL_RADIX_10 1 // special case base 10 radix conversions
|
#define USE_SPECIAL_RADIX_10 1 // special case base 10 radix conversions
|
||||||
#define USE_SINGLE_CASE_FAST 1 // special case single digit numbers
|
#define USE_SINGLE_CASE_FAST 1 // special case single digit numbers
|
||||||
|
|
|
@ -133,7 +133,12 @@ size_t i64toa_radix(char buf[minimum_length(66)], int64_t n, unsigned base);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* 2 <= base <= 36 */
|
/* 2 <= base <= 36 */
|
||||||
char const digits36[36] = "0123456789abcdefghijklmnopqrstuvwxyz";
|
char const digits36[36] = {
|
||||||
|
'0','1','2','3','4','5','6','7','8','9',
|
||||||
|
'a','b','c','d','e','f','g','h','i','j',
|
||||||
|
'k','l','m','n','o','p','q','r','s','t',
|
||||||
|
'u','v','w','x','y','z'
|
||||||
|
};
|
||||||
|
|
||||||
/*---- variants ----*/
|
/*---- variants ----*/
|
||||||
|
|
||||||
|
@ -238,7 +243,7 @@ define_i64toa(shift)
|
||||||
#endif /* TEST_SHIFTBUF */
|
#endif /* TEST_SHIFTBUF */
|
||||||
|
|
||||||
#if defined(TEST_DIGIT_PAIRS) || defined(TEST_DIGIT_1PASS)
|
#if defined(TEST_DIGIT_PAIRS) || defined(TEST_DIGIT_1PASS)
|
||||||
static char const digits100[200] =
|
static char const digits100[] =
|
||||||
"00010203040506070809"
|
"00010203040506070809"
|
||||||
"10111213141516171819"
|
"10111213141516171819"
|
||||||
"20212223242526272829"
|
"20212223242526272829"
|
||||||
|
|
Loading…
Reference in a new issue