]> xenbits.xensource.com Git - libvirt.git/commit
maint: fix "mixing declarations and code" errors
authorRoman Bogorodskiy <bogorodskiy@gmail.com>
Tue, 8 Nov 2022 19:12:22 +0000 (20:12 +0100)
committerRoman Bogorodskiy <bogorodskiy@gmail.com>
Wed, 9 Nov 2022 17:22:47 +0000 (18:22 +0100)
commit2e16c9f20280fc051adea7544600fdc351415739
tree7a215ea5d488e5dc04a247fbc64c92414fee00d4
parent9dbdf9ced8333085edb785692254fa4b7defd43a
maint: fix "mixing declarations and code" errors

clang 14.0.5 complains:

../src/bhyve/bhyve_device.c:42:29: error: mixing declarations and code
is incompatible with standards before C99
[-Werror,-Wdeclaration-after-statement]
    virDomainPCIAddressSet *addrs = opaque;
                            ^
1 error generated.

And a few similar errors in some other places, mainly bhyve related.
Apply a trivial fix to resolve that.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/bhyve/bhyve_device.c
tests/bhyvexml2argvmock.c
tests/domaincapstest.c
tests/networkxml2conftest.c