From: Arran Cudbard-Bell Date: Wed, 26 Sep 2018 09:48:47 +0000 (+0800) Subject: Should be const too X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1be13aa9bcdc3ede4e29af3263a64bb05d5c0e7b;p=thirdparty%2Ffreeradius-server.git Should be const too --- diff --git a/src/lib/json/json_missing.h b/src/lib/json/json_missing.h index 762474f3c35..47876307efa 100644 --- a/src/lib/json/json_missing.h +++ b/src/lib/json/json_missing.h @@ -78,11 +78,11 @@ enum json_tokener_error json_tokener_get_error(json_tokener *tok); /* redefine with correct handling of const pointers */ #if defined(__GNUC__) && !defined(__STRICT_ANSI__) # define json_object_object_foreach(obj, key, val) \ - char *key = NULL; \ + char const *key = NULL; \ struct json_object *val = NULL; \ union ctn_u {const void *cdata; void *data; } ctn; \ for (struct lh_entry *entry = json_object_get_object(obj)->head; \ - ({ if (entry) { key = (char *)entry->k; ctn.cdata = entry->v; \ + ({ if (entry) { key = (char const *)entry->k; ctn.cdata = entry->v; \ val = (struct json_object *)ctn.data; }; entry; }); \ entry = entry->next) #else /* ANSI C or MSC */