sd-json: make static analyzers shut up

https://github.com/systemd/systemd/pull/32628#pullrequestreview-2115501478
This commit is contained in:
Lennart Poettering
2024-06-13 15:22:27 +02:00
parent a2979bb842
commit 828e52bf8f

View File

@@ -76,7 +76,11 @@ struct sd_json_variant {
/* The current 'depth' of the sd_json_variant, i.e. how many levels of member variants this has */
uint16_t depth;
int type:8; /* actually sd_json_variant_type_t, but reduced to 8bit size */
signed int type:8; /* actually sd_json_variant_type_t, but reduced to 8bit size (we used "signed int"
* rather than just "int", since apparently compilers are free to pick signedness
* otherwise. We don't really care about the signedess, we care more about whether
* the enum can be converted to this, but we never use the negative values of
* sd_json_variant_type_t here.) */
/* A marker whether this variant is embedded into in array/object or not. If true, the 'parent' pointer above
* is valid. If false, the 'n_ref' field above is valid instead. */