Skip to content

Fix -Wunterminated-string-initialization warning #787

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 5, 2025

Conversation

bnoordhuis
Copy link
Contributor

Unbreaks the Cygwin build.

@@ -590,7 +590,13 @@ size_t utf8_encode_buf16(char *dest, size_t dest_len, const uint16_t *src, size_
*/

/* 2 <= base <= 36 */
char const digits36[36] = "0123456789abcdefghijklmnopqrstuvwxyz";
Copy link
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
59 checks passed
@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