From: chenguoping Date: Fri, 27 Dec 2019 07:39:31 +0000 (+0800) Subject: pointer types discards qualifiers X-Git-Tag: json-c-0.14-20200419~66^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F519%2Fhead;p=thirdparty%2Fjson-c.git pointer types discards qualifiers --- diff --git a/tests/test_double_serializer.c b/tests/test_double_serializer.c index 773527af..bad7ef55 100644 --- a/tests/test_double_serializer.c +++ b/tests/test_double_serializer.c @@ -34,7 +34,8 @@ int main() json_object_put(obj); printf("Test no zero reset serializer:\n"); obj = json_object_new_double(3.1415000); - json_object_set_serializer(obj, json_object_double_to_json_string, "%.17g", NULL); + char data[] = "%.17g"; + json_object_set_serializer(obj, json_object_double_to_json_string, data, NULL); printf("obj.to_string(reset)=%s\n", json_object_to_json_string_ext(obj, 4)); json_object_put(obj);