Skip to content
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

Fix panic arg in raw_term.c:extract_codepoint #93

Merged

Conversation

Techcable
Copy link
Contributor

I got the following error in clang:

src/rawterm.c:345:18: warning: passing 'char[18]' to parameter of type 'JanetString' (aka 'const unsigned char *') converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
    janet_panics("invalid codepoint");
                 ^~~~~~~~~~~~~~~~~~~
/opt/homebrew/Cellar/janet/1.25.1/include/janet/janet.h:1957:57: note: passing argument to parameter 'message' here
JANET_NO_RETURN JANET_API void janet_panics(JanetString message);
                                                        ^

This change should fix the error and avoid undefined behavior.

Fixes a type error/warning and avoids undefined behavior
@Techcable Techcable changed the title Fix panic arg in raw_term.c:extract_codepoint Fix panic arg in raw_term.c:extract_codepoint Nov 15, 2022
@bakpakin bakpakin merged commit dbd6877 into janet-lang:master Nov 26, 2022
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.

None yet

2 participants