Skip to content

Fix builds with clang

Andre Przywara kvm 1 version Applied

Status from this message: Applied to kvmtool (master), thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2option parsing: fix type of empty .argh parameterarm/include/arm-common/kvm-config-arch.h builtin-run.c include/kvm/parse-options.h+6 -50 replies
2/2virtio: sanitise virtio endian wrappersinclude/kvm/virtio.h virtio/9p.c virtio/blk.c +4 more+71 -610 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH kvmtool 0/2] Fix builds with clang

When trying to build kvmtool with clang, it warned about two problems, which are fatal since we use "-Werror".

Patch 1/2 is an easy one fixing an obvious bug (not sure why GCC didn't warn). Patch 2/2 removes an ugly hack which clang didn't want to let pass. This patch admittedly implements the most tedious solution to this problem, but I didn't want to just throw in a "__maybe_unused" (or "__used", as kvmtool puts it). If that solution is a bit over the top, let me know, maybe there is better solution which doesn't require to touch every user of the virtio endianess conversion functions - or __maybe_unused is OK after all.

Cheers,
Andre

Andre Przywara (2):
option parsing: fix type of empty .argh parameter
virtio: sanitise virtio endian wrappers

 arm/include/arm-common/kvm-config-arch.h |  2 +-
 builtin-run.c                            |  2 +-
 include/kvm/parse-options.h              |  7 ++--
 include/kvm/virtio.h                     | 53 ++++++++++++++----------
 virtio/9p.c                              |  2 +-
 virtio/blk.c                             |  8 ++--
 virtio/console.c                         |  6 +--
 virtio/core.c                            | 37 +++++++++--------
 virtio/net.c                             |  6 +--
 virtio/scsi.c                            | 20 ++++-----
 10 files changed, 77 insertions(+), 66 deletions(-)
Signature · 1 line
2.25.1