KVM: selftests: Enable printf format warnings for TEST_ASSERT

Use the format attribute to enable printf format warnings, and
then fix them all.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Andrew Jones
2020-03-10 10:15:55 +01:00
committed by Paolo Bonzini
parent 6a46fcf92f
commit d9eaf19ecc
10 changed files with 16 additions and 17 deletions

View File

@@ -384,7 +384,7 @@ static void run_test(enum vm_guest_mode mode, bool use_uffd,
*/
TEST_ASSERT(guest_num_pages < vm_get_max_gfn(vm),
"Requested more guest memory than address space allows.\n"
" guest pages: %lx max gfn: %lx vcpus: %d wss: %lx]\n",
" guest pages: %lx max gfn: %x vcpus: %d wss: %lx]\n",
guest_num_pages, vm_get_max_gfn(vm), vcpus,
vcpu_memory_bytes);