-
Notifications
You must be signed in to change notification settings - Fork 193
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
Resolved multiple warnings on Apple
targets.
#1145
Conversation
It would be better to solve the root cause of this warning, which is that hxcpp/toolchain/iphoneos-toolchain.xml Line 35 in 17ac6e8
|
@tobil4sk is it fine now? |
@MAJigsaw77 Thanks, the mac-toolchain.xml changes look good to me now |
@tobil4sk Are the changes from |
Tested them, they work flawlessly |
Thanks, they look good to me too |
@@ -217,7 +217,7 @@ class PointerData : public hx::Object | |||
String toString() | |||
{ | |||
char buf[100]; | |||
sprintf(buf,"Pointer(%p)", mValue); | |||
snprintf(buf,sizeof(buf),"Pointer(%p)", mValue); |
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.
Was this correct? sizeof()
returns the size of a single char
, it doesn't return 100
.
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.
Actually, it looks like in this case it does work properly since char buf[]
is stack allocated. Is it also working correctly in mysql/my_api.cpp
?
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.
Would seem like this is also the case there:
hxcpp/src/hx/libs/mysql/my_proto.h
Line 114 in 08f88ff
char last_error[MAX_ERR_SIZE]; |
Should all be good then.
sprintf
withsnprintf
becausesprintf
is deprecated.-Wno-unused-command-line-argument
to MacOS toolchain to remove warnings related to unused commands, for exampleclang: warning: argument unused during compilation: '-stdlib=libc++' [-Wunused-command-line-argument]
.