diff options
author | André Almeida <andrealmeid@collabora.com> | 2020-11-17 17:52:44 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-12-10 12:15:20 -0500 |
commit | 872e6c47a083be5afb82b40aae849c7108ae5584 (patch) | |
tree | d93672d6d98e9dc55bb6fc36c624bd24bd998d49 /scripts/decodetree.py | |
parent | f79248b53bee83bb8e69c8b2e9d70d6d28039987 (diff) | |
download | qemu-872e6c47a083be5afb82b40aae849c7108ae5584.zip qemu-872e6c47a083be5afb82b40aae849c7108ae5584.tar.gz qemu-872e6c47a083be5afb82b40aae849c7108ae5584.tar.bz2 |
kernel-doc: fix processing nested structs with attributes
The current regular expression for strip attributes of structs (and
for nested ones as well) also removes all whitespaces that may
surround the attribute. After that, the code will split structs and
iterate for each symbol separated by comma at the end of struct
definition (e.g. "} alias1, alias2;"). However, if the nested struct
does not have any alias and has an attribute, it will result in a
empty string at the closing bracket (e.g "};"). This will make the
split return nothing and $newmember will keep uninitialized. Fix
that, by ensuring that the attribute substitution will leave at least
one whitespace.
Signed-off-by: André Almeida <andrealmeid@collabora.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201117165312.118257-2-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'scripts/decodetree.py')
0 files changed, 0 insertions, 0 deletions