This is an automated email from the ASF dual-hosted git repository.

kasjer pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit 532f334f3410ccd626fe0f3a10e691ef82aec715
Author: Jerzy Kasenberg <[email protected]>
AuthorDate: Thu Jun 18 14:15:31 2026 +0200

    encoding/json: Add const for string fileds
    
    With this change json can be used with some
    values taken from string literals that would
    rise warning or error otherwise.
    
    Signed-off-by: Jerzy Kasenberg <[email protected]>
---
 encoding/json/include/json/json.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/encoding/json/include/json/json.h 
b/encoding/json/include/json/json.h
index 93de54c8d..3a9808ab3 100644
--- a/encoding/json/include/json/json.h
+++ b/encoding/json/include/json/json.h
@@ -46,7 +46,7 @@ struct json_value {
     union {
         uint64_t u;
         float fl;
-        char *str;
+        const char *str;
         struct {
             char **keys;
             struct json_value **values;
@@ -117,7 +117,7 @@ typedef enum {
 } json_type;
 
 struct json_enum_t {
-    char *name;
+    const char *name;
     long long int value;
 };
 

Reply via email to