Add an assert() to prevent calling cluster_clean() on a non-existent
struct. (And ISO C forbids zero-length arrays anyway.)
Also, initialize clusters[0].objects right after declaration.
GCC 11 complains about uninitialized variables when the initialization
happens in a lower scope (inside a loop in this case) than the call to
free, even when entering the lower scope is guaranteed.
Add an
assert()
to prevent callingcluster_clean()
on a non-existent struct. (And ISO C forbids zero-length arrays anyway.)Also, initialize
clusters[0].objects
right after declaration. GCC 11 complains about uninitialized variables when the initialization happens in a lower scope (inside a loop in this case) than the call tofree
, even when entering the lower scope is guaranteed.Signed-off-by: Michal Fabik mfabik@redhat.com