qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v8 1/8] linux-headers: update to 6.0-rc3


From: Thomas Huth
Subject: Re: [PATCH v8 1/8] linux-headers: update to 6.0-rc3
Date: Mon, 26 Sep 2022 14:53:07 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0

On 02/09/2022 19.27, Matthew Rosato wrote:
Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
---
...
diff --git a/linux-headers/asm-x86/kvm.h b/linux-headers/asm-x86/kvm.h
index bf6e96011d..46de10a809 100644
--- a/linux-headers/asm-x86/kvm.h
+++ b/linux-headers/asm-x86/kvm.h
@@ -198,13 +198,13 @@ struct kvm_msrs {
        __u32 nmsrs; /* number of msrs in entries */
        __u32 pad;
- struct kvm_msr_entry entries[0];
+       struct kvm_msr_entry entries[];
  };

Yuck, this fails to compile with Clang:

 https://gitlab.com/thuth/qemu/-/jobs/3084427423#L2206

../target/i386/kvm/kvm.c:470:25: error: field 'info' with variable sized type 'struct kvm_msrs' not at the end of a struct or class is a GNU extension [-Werror,-Wgnu-variable-sized-type-not-at-end]
        struct kvm_msrs info;
                        ^

Anybody any ideas how to fix this best? Simply disable the compiler warning in QEMU?

 Thomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]