-
Notifications
You must be signed in to change notification settings - Fork 683
Build fix for mbedk64f target #935
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
Conversation
LGTM |
@@ -50,5 +50,5 @@ int jerry_port_errormsg (const char *format, /**< format string */ | |||
*/ | |||
int jerry_port_putchar (int c) /**< character to put */ | |||
{ | |||
return putchar (c); | |||
return putchar ((unsigned char) c); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this is a problem?
http://www.cplusplus.com/reference/cstdio/putchar/
putchar should accept int argument.
@zherczeg : A conversion error (conversion to 'unsigned char' from 'int' may alter its value) occurs when I tried to build to mbedk64f target with enabled USE_COMPILER_DEFAULT_LIBC. |
Btw could we make jerry_port_putchar to accept unsigned char? Is it frequently used? |
No, it's very rarely used, but we couldn't get away with the cast, for example the following line : |
LGTM |
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
Rebased with master. |
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com