Skip to content

Fix -Wunterminated-string-initialization warning#787

Merged
bnoordhuis merged 2 commits intoquickjs-ng:masterfrom
bnoordhuis:fix-compiler-warning
Jan 5, 2025
Merged

Fix -Wunterminated-string-initialization warning#787
bnoordhuis merged 2 commits intoquickjs-ng:masterfrom
bnoordhuis:fix-compiler-warning

Conversation

@bnoordhuis
Copy link
Copy Markdown
Contributor

Unbreaks the Cygwin build.

Comment thread cutils.c
*/

/* 2 <= base <= 36 */
char const digits36[36] = "0123456789abcdefghijklmnopqrstuvwxyz";
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compiler is right to complain because sizeof("0123456789abcdefghijklmnopqrstuvwxyz") is 37, not 36.

@bnoordhuis bnoordhuis merged commit 6e43400 into quickjs-ng:master Jan 5, 2025
@bnoordhuis bnoordhuis deleted the fix-compiler-warning branch January 5, 2025 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant