Yubico / yubikey-personalization

YubiKey Personalization cross-platform library and tool
https://developers.yubico.com/yubikey-personalization/
BSD 2-Clause "Simplified" License
300 stars 82 forks source link

Don't use deprecated libjson-c symbols #44

Closed jas4711 closed 10 years ago

jas4711 commented 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); ^

klali commented 10 years ago

they refer to json_object_object_get_ex() that was added in 0.10 so we need to do some checking for versions