Skip to content

JSON: aliasing violation

As shown by compiler warnings:

../../modules/misc/webservices/json.c:134:13: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
             value->_reserved.object_mem = (*(char **) &value->u.object.values) + values_size;
             ^~~~~
../../modules/misc/webservices/json.c: In function ‘json_parse_ex’:
../../modules/misc/webservices/json.c:342:25: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
                         (*(json_char **) &top->u.object.values) += string_length + 1;
                         ^
Edited by Rémi Denis-Courmont
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information