Using version 0.12 of the json-c library generates these warnings:
/O
CC (gcc) [M json.so] json_funcs.o json_funcs.c:64:44: warning: 'json_object_object_get' is deprecated [-Wdeprecated-declarations] value = (char*)json_object_to_json_string(json_object_object_get(j, field_s.s)); ^ /usr/local/include/json-c/json_object.h:290:56: note: 'json_object_object_get' has been explicitly marked deprecated here THIS_FUNCTION_IS_DEPRECATED(extern struct json_object* json_object_object_get(struct json_object* obj, ^ /usr/local/include/json-c/json_object.h:17:43: note: expanded from macro 'THIS_FUNCTION_IS_DEPRECATED' #define THIS_FUNCTION_IS_DEPRECATED(func) func __attribute__ ((deprecated)) ^
On 17 Jan 2015, at 11:52, Olle E. Johansson oej@edvina.net wrote:
Using version 0.12 of the json-c library generates these warnings:
/O
CC (gcc) [M json.so] json_funcs.o json_funcs.c:64:44: warning: 'json_object_object_get' is deprecated [-Wdeprecated-declarations] value = (char*)json_object_to_json_string(json_object_object_get(j, field_s.s)); ^ /usr/local/include/json-c/json_object.h:290:56: note: 'json_object_object_get' has been explicitly marked deprecated here THIS_FUNCTION_IS_DEPRECATED(extern struct json_object* json_object_object_get(struct json_object* obj, ^ /usr/local/include/json-c/json_object.h:17:43: note: expanded from macro 'THIS_FUNCTION_IS_DEPRECATED' #define THIS_FUNCTION_IS_DEPRECATED(func) func __attribute__ ((deprecated)) ^
jsonrpc-c is the same:
CC (gcc) [M jsonrpc-c.so] jsonrpc.o jsonrpc.c:88:21: warning: 'json_object_object_get' is deprecated [-Wdeprecated-declarations] json_object *_id = json_object_object_get(response, "id"); ^ /usr/local/include/json-c/json_object.h:290:56: note: 'json_object_object_get' has been explicitly marked deprecated here THIS_FUNCTION_IS_DEPRECATED(extern struct json_object* json_object_object_get(struct json_object* obj, ^ /usr/local/include/json-c/json_object.h:17:43: note: expanded from macro 'THIS_FUNCTION_IS_DEPRECATED' #define THIS_FUNCTION_IS_DEPRECATED(func) func __attribute__ ((deprecated)) ^ jsonrpc.c:96:24: warning: 'json_object_object_get' is deprecated [-Wdeprecated-declarations] json_object *result = json_object_object_get(response, "result"); ^ /usr/local/include/json-c/json_object.h:290:56: note: 'json_object_object_get' has been explicitly marked deprecated here THIS_FUNCTION_IS_DEPRECATED(extern struct json_object* json_object_object_get(struct json_object* obj, ^ /usr/local/include/json-c/json_object.h:17:43: note: expanded from macro 'THIS_FUNCTION_IS_DEPRECATED' #define THIS_FUNCTION_IS_DEPRECATED(func) func __attribute__ ((deprecated)) ^ jsonrpc.c:101:24: warning: 'json_object_object_get' is deprecated [-Wdeprecated-declarations] json_object *error = json_object_object_get(response, "error"); ^ /usr/local/include/json-c/json_object.h:290:56: note: 'json_object_object_get' has been explicitly marked deprecated here THIS_FUNCTION_IS_DEPRECATED(extern struct json_object* json_object_object_get(struct json_object* obj, ^ /usr/local/include/json-c/json_object.h:17:43: note: expanded from macro 'THIS_FUNCTION_IS_DEPRECATED' #define THIS_FUNCTION_IS_DEPRECATED(func) func __attribute__ ((deprecated)) ^ 3 warnings generated. C