Skip to content

add fmt warnings to printf, and fix bad uses

Andrew Jones kvm 3 versions – Applied

Status from this message: Applied, thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 2 repliesApplied
  2. v24 patches 6 repliesSuperseded
  3. v14 patches 13 repliesSuperseded

Changes in v3 from the cover letter

* another lu in desc.c [Thomas]
* handle phys_addr_t := u32 in alloc.c [Thomas]

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/4lib: *printf: warn on format/arg mismatchlib/libcflat.h+9 -50 replies
2/4lib/alloc: fix format warnings, add/use PRIx64lib/alloc.c lib/libcflat.h+26 -111 reply
3/4arm64: fix printf format warningslib/arm64/processor.c+4 -40 replies
4/4x86: fix printf format warningslib/x86/desc.c lib/x86/vm.c x86/access.c +13 more+53 -520 replies

Reviews trailers per patch

3 of 4 patches have a Reviewed-by or Acked-by.

PatchThomas Huth
1/4
2/4R-b
3/4R-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [kvm-unit-tests PATCH v3 0/4] add fmt warnings to printf, and fix bad uses

Thomas suggested adding __attribute__((format(printf, i, j))) to our *printf functions. So I did. And then fixed all the warnings...

v3:
* another lu in desc.c [Thomas]
* handle phys_addr_t := u32 in alloc.c [Thomas]
v2:
* don't use the temporary _f() macro the attributes [Paolo]
* changes from Thomas' review comments
- desc.c: use %lu instead of %ld
- msr.c: don't screw up the int:int output of a longlong
- taskswitch2.c: remove useless (ulong*) casts

Andrew Jones (4):
lib: *printf: warn on format/arg mismatch
lib/alloc: fix format warnings, add/use PRIx64
arm64: fix printf format warnings
x86: fix printf format warnings

 lib/alloc.c               | 25 ++++++++++++++-----------
 lib/arm64/processor.c     |  8 ++++----
 lib/libcflat.h            | 26 +++++++++++++++++++++-----
 lib/x86/desc.c            |  6 +++---
 lib/x86/vm.c              |  6 +++---
 x86/access.c              |  4 ++--
 x86/eventinj.c            |  8 ++++----
 x86/kvmclock.c            |  2 +-
 x86/kvmclock_test.c       |  6 +++---
 x86/msr.c                 |  3 ++-
 x86/s3.c                  |  6 +++---
 x86/svm.c                 | 12 ++++++------
 x86/taskswitch.c          |  2 +-
 x86/taskswitch2.c         |  4 ++--
 x86/tsc.c                 |  4 ++--
 x86/tscdeadline_latency.c |  2 +-
 x86/vmx.c                 | 18 +++++++++---------
 x86/vmx_tests.c           | 20 ++++++++++----------
 x86/xsave.c               |  2 +-
 19 files changed, 92 insertions(+), 72 deletions(-)
Signature · 1 line
2.4.3