Re: [PATCH] Fix missing-field-initializers error

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

 



On Thu, Jan 13, 2022 at 12:11:47AM +0800, huangy81@xxxxxxxxxxxxxxx wrote:
> From: Hyman Huang(黄勇) <huangy81@xxxxxxxxxxxxxxx>
> 
> When compile libvirt via ninja tool with default configuration,
> it report the error message as the following:
> "missing initializer for field 'path' of 'virTPMBinaryInfo'".
> So initialize the 'path' field in 'virTPMBinaryInfo' with 'NULL'.

I'm wondering why this isn't reported by our automated CI.

What OS distro / GCC / CLang version are you seeing this with ?


> 
> Signed-off-by: Hyman Huang(黄勇) <huangy81@xxxxxxxxxxxxxxx>
> ---
>  src/util/virtpm.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/src/util/virtpm.c b/src/util/virtpm.c
> index cf4c7c4..a02d933 100644
> --- a/src/util/virtpm.c
> +++ b/src/util/virtpm.c
> @@ -122,13 +122,16 @@ typedef struct _virTPMBinaryInfo {
>  
>  static virTPMBinaryInfo swtpmBinaries[VIR_TPM_BINARY_LAST] = {
>      [VIR_TPM_BINARY_SWTPM] = {
> +        .path = NULL,
>          .parm = "socket",
>          .capsParse = virTPMSwtpmFeatureTypeFromString,
>      },
>      [VIR_TPM_BINARY_SWTPM_SETUP] = {
> +        .path = NULL,
>          .capsParse = virTPMSwtpmSetupFeatureTypeFromString,
>      },
>      [VIR_TPM_BINARY_SWTPM_IOCTL] = {
> +        .path = NULL,
>      },
>  };
>  
> -- 
> 1.8.3.1
> 
> 

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux