Follow-up to this patch:
https://listman.redhat.com/archives/libguestfs/2021-November/msg00251.html
Patches 1-3 are probably down to over-active warnings in the old
version of GCC. Patch 3 in particular is bogus, but needed to get
around the warning.
Patch 4 moves the test so it's next to the header file being tested.
I don't mind if you squash these into your patch before pushing.
Rich.