[Top][All Lists]

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

[Qemu-commits] [qemu/qemu] 039d4e: scsi: Address spurious clang warning

From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 039d4e: scsi: Address spurious clang warning
Date: Tue, 27 Nov 2018 16:37:13 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 039d4e3df0049bdd8f93a2de735a816483b13954
  Author: John Snow <address@hidden>
  Date:   2018-11-27 (Tue, 27 Nov 2018)

  Changed paths:
    M scsi/qemu-pr-helper.c

  Log Message:
  scsi: Address spurious clang warning

Some versions of Clang prior to 6.0 (and some builds of clang after,
such as 6.0.1-2.fc28) fail to recognize { 0 } as a valid initializer
for a struct with subobjects when -Wmissing-braces is enabled.

https://bugs.llvm.org/show_bug.cgi?id=21689 and
https://reviews.llvm.org/rL314499 suggests this should be fixed in 6.0,
but it might not be the case for older versions or downstream versions.

For now, follow the precedent of ebf2a499 and replace the standard { 0 }
with the accepted { } to silence this warning and allow the build to
work under clang 6.0.1-2.fc28, and builds prior to 6.0.

Signed-off-by: John Snow <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-id: address@hidden
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>

      **NOTE:** This service has been marked for deprecation: 

      Functionality will be removed from GitHub.com on January 31st, 2019.

reply via email to

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