From 87774ab087a55b9347acc0f89a38df408f209fb9 Mon Sep 17 00:00:00 2001 From: OpenGnSys Support Team Date: Thu, 10 Jun 2021 17:04:46 +0200 Subject: constify json parse helper function json_t * parameter is not modified, constify to allow compiler to spew warnings in case the function tries to modify it. --- src/json.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/json.h') diff --git a/src/json.h b/src/json.h index 17e5698..1790d24 100644 --- a/src/json.h +++ b/src/json.h @@ -4,11 +4,11 @@ #include #include "schedule.h" -int og_json_parse_string(json_t *element, const char **str); -int og_json_parse_string_copy(json_t *element, char *str, size_t size); -int og_json_parse_uint64(json_t *element, uint64_t *integer); -int og_json_parse_uint(json_t *element, uint32_t *integer); -int og_json_parse_bool(json_t *element, bool *value); +int og_json_parse_string(const json_t *element, const char **str); +int og_json_parse_string_copy(const json_t *element, char *str, size_t size); +int og_json_parse_uint64(const json_t *element, uint64_t *integer); +int og_json_parse_uint(const json_t *element, uint32_t *integer); +int og_json_parse_bool(const json_t *element, bool *value); #define OG_PARAM_PART_NUMBER (1UL << 0) #define OG_PARAM_PART_CODE (1UL << 1) -- cgit v1.2.3-18-g5258