Conversation
| { | ||
| static char version[15]; | ||
| sprintf(version, "%i.%i.%i", CJSON_AS4CPP_VERSION_MAJOR, CJSON_AS4CPP_VERSION_MINOR, CJSON_AS4CPP_VERSION_PATCH); | ||
| snprintf(version, sizeof(version), "%i.%i.%i", CJSON_AS4CPP_VERSION_MAJOR, CJSON_AS4CPP_VERSION_MINOR, CJSON_AS4CPP_VERSION_PATCH); |
There was a problem hiding this comment.
are we sure we want to be laying changes on top of this copy/pasted CJSON implementation?
if we take an update, won't these changes just get wiped away?
There was a problem hiding this comment.
since this is external code, it might be simpler to just disable the warnings from the top of the file, or in the CMakeLists.txt somehow ... something isolated with a high chance of being preserved if someone copy/pastes an updated cJSON.cpp into the repo
... discuss with the CPP team how they want to handle it
There was a problem hiding this comment.
Since we are already C99, since we have already modified version of cJSON, we will unblock existing mac builds (i.e. I'm for merging this change).
And deal with external dependencies later.
* switch sprintf to snprintf * find correct sizeof output_pointer
* switch sprintf to snprintf * find correct sizeof output_pointer
Issue #, if available:
Ran into this warning when building on mac:
Description of changes:
switch sprintf to snprintf
Check all that applies:
Check which platforms you have built SDK on to verify the correctness of this PR.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.