FIX: supress gcc warnings like libjansson

https://github.com/akheron/jansson/pull/423/files
This commit is contained in:
iceman1001 committed 2019-01-09 12:28:56 +01:00
1 parent 8f18a9abf2
commit 96361abd97
3 files changed
+5 -5

No files matched your search

+1 -1
View File
@@ -25,7 +25,7 @@ void jsonp_error_set_source(json_error_t *error, const char *source)
length = strlen(source);
if(length < JSON_ERROR_SOURCE_LENGTH)
strncpy(error->source, source, length + 1);
strncpy(error->source, source, JSON_ERROR_SOURCE_LENGTH);
else {
size_t extra = length - JSON_ERROR_SOURCE_LENGTH + 4;
memcpy(error->source, "...", 3);