qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] block/vhdx.c: Mark parent_vhdx_guid variable as unused
@ 2014-09-14 19:29 Peter Maydell
  2014-09-15  1:39 ` Fam Zheng
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Peter Maydell @ 2014-09-14 19:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, Jeff Cody, Stefan Hajnoczi, patches

The parent_vhdx_guid variable is defined but never used, which provokes
complaints from newer versions of clang. Since the variable definition
is here acting as documentation of the image format, mark it with the
'unused' attribute to keep the compiler happy rather than simply
deleting it.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 block/vhdx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/block/vhdx.c b/block/vhdx.c
index 87c99fc..367a3e7 100644
--- a/block/vhdx.c
+++ b/block/vhdx.c
@@ -99,7 +99,8 @@ static const MSGUID logical_sector_guid = { .data1 = 0x8141bf1d,
 /* Each parent type must have a valid GUID; this is for parent images
  * of type 'VHDX'.  If we were to allow e.g. a QCOW2 parent, we would
  * need to make up our own QCOW2 GUID type */
-static const MSGUID parent_vhdx_guid = { .data1 = 0xb04aefb7,
+static const MSGUID parent_vhdx_guid __attribute__((unused))
+                                     = { .data1 = 0xb04aefb7,
                                          .data2 = 0xd19e,
                                          .data3 = 0x4a81,
                                          .data4 = { 0xb7, 0x89, 0x25, 0xb8,
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] block/vhdx.c: Mark parent_vhdx_guid variable as unused
  2014-09-14 19:29 [Qemu-devel] [PATCH] block/vhdx.c: Mark parent_vhdx_guid variable as unused Peter Maydell
@ 2014-09-15  1:39 ` Fam Zheng
  2014-09-15 12:08 ` Jeff Cody
  2014-09-15 15:45 ` Stefan Hajnoczi
  2 siblings, 0 replies; 4+ messages in thread
From: Fam Zheng @ 2014-09-15  1:39 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Kevin Wolf, Jeff Cody, qemu-devel, Stefan Hajnoczi, patches

On Sun, 09/14 20:29, Peter Maydell wrote:
> The parent_vhdx_guid variable is defined but never used, which provokes
> complaints from newer versions of clang. Since the variable definition
> is here acting as documentation of the image format, mark it with the
> 'unused' attribute to keep the compiler happy rather than simply
> deleting it.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>  block/vhdx.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/block/vhdx.c b/block/vhdx.c
> index 87c99fc..367a3e7 100644
> --- a/block/vhdx.c
> +++ b/block/vhdx.c
> @@ -99,7 +99,8 @@ static const MSGUID logical_sector_guid = { .data1 = 0x8141bf1d,
>  /* Each parent type must have a valid GUID; this is for parent images
>   * of type 'VHDX'.  If we were to allow e.g. a QCOW2 parent, we would
>   * need to make up our own QCOW2 GUID type */
> -static const MSGUID parent_vhdx_guid = { .data1 = 0xb04aefb7,
> +static const MSGUID parent_vhdx_guid __attribute__((unused))
> +                                     = { .data1 = 0xb04aefb7,
>                                           .data2 = 0xd19e,
>                                           .data3 = 0x4a81,
>                                           .data4 = { 0xb7, 0x89, 0x25, 0xb8,
> -- 
> 2.0.0
> 
> 

Reviewed-by: Fam Zheng <famz@redhat.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] block/vhdx.c: Mark parent_vhdx_guid variable as unused
  2014-09-14 19:29 [Qemu-devel] [PATCH] block/vhdx.c: Mark parent_vhdx_guid variable as unused Peter Maydell
  2014-09-15  1:39 ` Fam Zheng
@ 2014-09-15 12:08 ` Jeff Cody
  2014-09-15 15:45 ` Stefan Hajnoczi
  2 siblings, 0 replies; 4+ messages in thread
From: Jeff Cody @ 2014-09-15 12:08 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Kevin Wolf, qemu-devel, Stefan Hajnoczi, patches

On Sun, Sep 14, 2014 at 08:29:59PM +0100, Peter Maydell wrote:
> The parent_vhdx_guid variable is defined but never used, which provokes
> complaints from newer versions of clang. Since the variable definition
> is here acting as documentation of the image format, mark it with the
> 'unused' attribute to keep the compiler happy rather than simply
> deleting it.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>  block/vhdx.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/block/vhdx.c b/block/vhdx.c
> index 87c99fc..367a3e7 100644
> --- a/block/vhdx.c
> +++ b/block/vhdx.c
> @@ -99,7 +99,8 @@ static const MSGUID logical_sector_guid = { .data1 = 0x8141bf1d,
>  /* Each parent type must have a valid GUID; this is for parent images
>   * of type 'VHDX'.  If we were to allow e.g. a QCOW2 parent, we would
>   * need to make up our own QCOW2 GUID type */
> -static const MSGUID parent_vhdx_guid = { .data1 = 0xb04aefb7,
> +static const MSGUID parent_vhdx_guid __attribute__((unused))
> +                                     = { .data1 = 0xb04aefb7,
>                                           .data2 = 0xd19e,
>                                           .data3 = 0x4a81,
>                                           .data4 = { 0xb7, 0x89, 0x25, 0xb8,
> -- 
> 2.0.0
>

Reviewed-by: Jeff Cody <jcody@redhat.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] block/vhdx.c: Mark parent_vhdx_guid variable as unused
  2014-09-14 19:29 [Qemu-devel] [PATCH] block/vhdx.c: Mark parent_vhdx_guid variable as unused Peter Maydell
  2014-09-15  1:39 ` Fam Zheng
  2014-09-15 12:08 ` Jeff Cody
@ 2014-09-15 15:45 ` Stefan Hajnoczi
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2014-09-15 15:45 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Kevin Wolf, Jeff Cody, qemu-devel, Stefan Hajnoczi, patches

[-- Attachment #1: Type: text/plain, Size: 611 bytes --]

On Sun, Sep 14, 2014 at 08:29:59PM +0100, Peter Maydell wrote:
> The parent_vhdx_guid variable is defined but never used, which provokes
> complaints from newer versions of clang. Since the variable definition
> is here acting as documentation of the image format, mark it with the
> 'unused' attribute to keep the compiler happy rather than simply
> deleting it.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>  block/vhdx.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block

Stefan

[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-09-15 15:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-14 19:29 [Qemu-devel] [PATCH] block/vhdx.c: Mark parent_vhdx_guid variable as unused Peter Maydell
2014-09-15  1:39 ` Fam Zheng
2014-09-15 12:08 ` Jeff Cody
2014-09-15 15:45 ` Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).