Skip to content

Instantly share code, notes, and snippets.

@radu-gheorghe
Created August 26, 2014 14:30
Show Gist options
  • Save radu-gheorghe/796f900767679aacdf57 to your computer and use it in GitHub Desktop.
Save radu-gheorghe/796f900767679aacdf57 to your computer and use it in GitHub Desktop.
rsyslog compile error
msg.c: In function 'getJSONPropVal':
msg.c:2736:3: warning: 'json_object_object_get' is deprecated (declared at /usr/include/json/json_object.h:217) [-Wdeprecated-declarations]
field = json_object_object_get(parent, (char*)leaf);
^
msg.c: In function 'msgGetJSONPropJSON':
msg.c:2789:2: warning: 'json_object_object_get' is deprecated (declared at /usr/include/json/json_object.h:217) [-Wdeprecated-declarations]
*pjson = json_object_object_get(parent, (char*)leaf);
^
In file included from /usr/include/json/linkhash.h:16:0,
from /usr/include/json/json.h:22,
from msg.c:44:
msg.c: In function 'MsgSetPropsViaJSON':
/usr/include/json/json_object.h:263:2: error: 'for' loop initial declarations are only allowed in C99 mode
for(struct lh_entry *entry = json_object_get_object(obj)->head; ({ if(entry) { key = (char*)entry->k; val = (struct json
^
msg.c:4095:2: note: in expansion of macro 'json_object_object_foreach'
json_object_object_foreach(json, name, val) {
^
/usr/include/json/json_object.h:263:2: note: use option -std=c99 or -std=gnu99 to compile your code
for(struct lh_entry *entry = json_object_get_object(obj)->head; ({ if(entry) { key = (char*)entry->k; val = (struct json
^
msg.c:4095:2: note: in expansion of macro 'json_object_object_foreach'
json_object_object_foreach(json, name, val) {
^
msg.c: In function 'jsonPathFindNext':
msg.c:4153:3: warning: 'json_object_object_get' is deprecated (declared at /usr/include/json/json_object.h:217) [-Wdeprecated-declarations]
json = json_object_object_get(root, (char*)namebuf);
^
msg.c: In function 'jsonFind':
msg.c:4222:3: warning: 'json_object_object_get' is deprecated (declared at /usr/include/json/json_object.h:217) [-Wdeprecated-declarations]
field = json_object_object_get(parent, (char*)leaf);
^
msg.c: In function 'msgAddJSON':
msg.c:4267:3: warning: 'json_object_object_get' is deprecated (declared at /usr/include/json/json_object.h:217) [-Wdeprecated-declarations]
leafnode = json_object_object_get(parent, (char*)leaf);
^
msg.c: In function 'msgDelJSON':
msg.c:4342:3: warning: 'json_object_object_get' is deprecated (declared at /usr/include/json/json_object.h:217) [-Wdeprecated-declarations]
leafnode = json_object_object_get(parent, (char*)leaf);
^
make[2]: *** [librsyslog_la-msg.lo] Error 1
make[2]: Leaving directory `/home/radu_encrypted/radu/gits/rsyslog/runtime'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/radu_encrypted/radu/gits/rsyslog'
make: *** [all] Error 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment