Closed jas4711 closed 10 years ago
After upgrading to libjson-c 0.11 I noticed a couple of warnings that I suppose we ought to fix by using some other symbol instead.
/Simon
../ykpers-json.c: In function '_ykp_json_import_cfg': ../ykpers-json.c:199:3: warning: 'json_object_object_get' is deprecated (declared at /usr/include/json-c/json_object.h:271) [-Wdeprecated-declarations] json_object yprod_json = json_object_object_get(jobj, "yubiProdConfig"); ^ ../ykpers-json.c:200:3: warning: 'json_object_object_get' is deprecated (declared at /usr/include/json-c/json_object.h:271) [-Wdeprecated-declarations] json_object jmode = json_object_object_get(yprod_json, "mode"); ^ ../ykpers-json.c:201:3: warning: 'json_object_object_get' is deprecated (declared at /usr/include/json-c/json_object.h:271) [-Wdeprecated-declarations] json_object options = json_object_object_get(yprod_json, "options"); ^ ../ykpers-json.c:212:3: warning: 'json_object_object_get' is deprecated (declared at /usr/include/json-c/json_object.h:271) [-Wdeprecated-declarations] jtarget = json_object_object_get(yprod_json, "targetConfig"); ^ ../ykpers-json.c:243:4: warning: 'json_object_object_get' is deprecated (declared at /usr/include/json-c/json_object.h:271) [-Wdeprecated-declarations] json_object jdigits = json_object_object_get(options, "oathDigits"); ^ ../ykpers-json.c:244:4: warning: 'json_object_object_get' is deprecated (declared at /usr/include/json-c/json_object.h:271) [-Wdeprecated-declarations] json_object jrandom = json_object_object_get(options, "randomSeed"); ^ ../ykpers-json.c:259:6: warning: 'json_object_object_get' is deprecated (declared at /usr/include/json-c/json_object.h:271) [-Wdeprecated-declarations] json_object jseed = json_object_object_get(options, "fixedSeedvalue"); ^ ../ykpers-json.c:281:5: warning: 'json_object_object_get' is deprecated (declared at /usr/include/json-c/json_object.h:271) [-Wdeprecated-declarations] json_object joption = json_object_object_get(options, p->json_text); ^ ../ykpers-json.c:296:5: warning: 'json_object_object_get' is deprecated (declared at /usr/include/json-c/json_object.h:271) [-Wdeprecated-declarations] json_object joption = json_object_object_get(options, p->json_text); ^ ../ykpers-json.c:311:5: warning: 'json_object_object_get' is deprecated (declared at /usr/include/json-c/json_object.h:271) [-Wdeprecated-declarations] json_object *joption = json_object_object_get(options, p->json_text); ^
they refer to json_object_object_get_ex() that was added in 0.10 so we need to do some checking for versions
After upgrading to libjson-c 0.11 I noticed a couple of warnings that I suppose we ought to fix by using some other symbol instead.
/Simon
../ykpers-json.c: In function '_ykp_json_import_cfg': ../ykpers-json.c:199:3: warning: 'json_object_object_get' is deprecated (declared at /usr/include/json-c/json_object.h:271) [-Wdeprecated-declarations] json_object yprod_json = json_object_object_get(jobj, "yubiProdConfig"); ^ ../ykpers-json.c:200:3: warning: 'json_object_object_get' is deprecated (declared at /usr/include/json-c/json_object.h:271) [-Wdeprecated-declarations] json_object jmode = json_object_object_get(yprod_json, "mode"); ^ ../ykpers-json.c:201:3: warning: 'json_object_object_get' is deprecated (declared at /usr/include/json-c/json_object.h:271) [-Wdeprecated-declarations] json_object options = json_object_object_get(yprod_json, "options"); ^ ../ykpers-json.c:212:3: warning: 'json_object_object_get' is deprecated (declared at /usr/include/json-c/json_object.h:271) [-Wdeprecated-declarations] jtarget = json_object_object_get(yprod_json, "targetConfig"); ^ ../ykpers-json.c:243:4: warning: 'json_object_object_get' is deprecated (declared at /usr/include/json-c/json_object.h:271) [-Wdeprecated-declarations] json_object jdigits = json_object_object_get(options, "oathDigits"); ^ ../ykpers-json.c:244:4: warning: 'json_object_object_get' is deprecated (declared at /usr/include/json-c/json_object.h:271) [-Wdeprecated-declarations] json_object jrandom = json_object_object_get(options, "randomSeed"); ^ ../ykpers-json.c:259:6: warning: 'json_object_object_get' is deprecated (declared at /usr/include/json-c/json_object.h:271) [-Wdeprecated-declarations] json_object jseed = json_object_object_get(options, "fixedSeedvalue"); ^ ../ykpers-json.c:281:5: warning: 'json_object_object_get' is deprecated (declared at /usr/include/json-c/json_object.h:271) [-Wdeprecated-declarations] json_object joption = json_object_object_get(options, p->json_text); ^ ../ykpers-json.c:296:5: warning: 'json_object_object_get' is deprecated (declared at /usr/include/json-c/json_object.h:271) [-Wdeprecated-declarations] json_object joption = json_object_object_get(options, p->json_text); ^ ../ykpers-json.c:311:5: warning: 'json_object_object_get' is deprecated (declared at /usr/include/json-c/json_object.h:271) [-Wdeprecated-declarations] json_object *joption = json_object_object_get(options, p->json_text); ^