* [Qemu-devel] [PATCH] vdi: wrapped uuid_unparse() in #ifdef
@ 2014-10-31 8:02 SeokYeon Hwang
2014-10-31 18:15 ` Stefan Weil
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: SeokYeon Hwang @ 2014-10-31 8:02 UTC (permalink / raw)
To: qemu-devel; +Cc: sw, SeokYeon Hwang
Wrapped uuid_unparse() in #ifdef to avoid "-Wunused-function" on clang 3.4 or later.
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
---
block/vdi.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/block/vdi.c b/block/vdi.c
index 19701ee..e1d211c 100644
--- a/block/vdi.c
+++ b/block/vdi.c
@@ -137,12 +137,14 @@ static inline int uuid_is_null(const uuid_t uu)
return memcmp(uu, null_uuid, sizeof(uuid_t)) == 0;
}
+# if defined(CONFIG_VDI_DEBUG)
static inline void uuid_unparse(const uuid_t uu, char *out)
{
snprintf(out, 37, UUID_FMT,
uu[0], uu[1], uu[2], uu[3], uu[4], uu[5], uu[6], uu[7],
uu[8], uu[9], uu[10], uu[11], uu[12], uu[13], uu[14], uu[15]);
}
+# endif
#endif
typedef struct {
--
2.1.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] vdi: wrapped uuid_unparse() in #ifdef
2014-10-31 8:02 [Qemu-devel] [PATCH] vdi: wrapped uuid_unparse() in #ifdef SeokYeon Hwang
@ 2014-10-31 18:15 ` Stefan Weil
2014-11-02 5:14 ` Michael Tokarev
2014-11-03 16:13 ` Paolo Bonzini
2 siblings, 0 replies; 4+ messages in thread
From: Stefan Weil @ 2014-10-31 18:15 UTC (permalink / raw)
To: SeokYeon Hwang, qemu-devel, qemu-trivial
Am 31.10.2014 um 09:02 schrieb SeokYeon Hwang:
> Wrapped uuid_unparse() in #ifdef to avoid "-Wunused-function" on clang 3.4 or later.
>
> Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
> ---
> block/vdi.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/block/vdi.c b/block/vdi.c
> index 19701ee..e1d211c 100644
> --- a/block/vdi.c
> +++ b/block/vdi.c
> @@ -137,12 +137,14 @@ static inline int uuid_is_null(const uuid_t uu)
> return memcmp(uu, null_uuid, sizeof(uuid_t)) == 0;
> }
>
> +# if defined(CONFIG_VDI_DEBUG)
> static inline void uuid_unparse(const uuid_t uu, char *out)
> {
> snprintf(out, 37, UUID_FMT,
> uu[0], uu[1], uu[2], uu[3], uu[4], uu[5], uu[6], uu[7],
> uu[8], uu[9], uu[10], uu[11], uu[12], uu[13], uu[14], uu[15]);
> }
> +# endif
> #endif
>
> typedef struct {
This code is only used on build hosts without libuuid development header
files, so the warning can be avoided by installing that header files.
Nevertheless, I think it is fine for qemu-trivial.
Reviewed-by: Stefan Weil <sw@weilnetz.de>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] vdi: wrapped uuid_unparse() in #ifdef
2014-10-31 8:02 [Qemu-devel] [PATCH] vdi: wrapped uuid_unparse() in #ifdef SeokYeon Hwang
2014-10-31 18:15 ` Stefan Weil
@ 2014-11-02 5:14 ` Michael Tokarev
2014-11-03 16:13 ` Paolo Bonzini
2 siblings, 0 replies; 4+ messages in thread
From: Michael Tokarev @ 2014-11-02 5:14 UTC (permalink / raw)
To: SeokYeon Hwang, qemu-devel; +Cc: qemu-trivial, sw
31.10.2014 11:02, SeokYeon Hwang wrote:
> Wrapped uuid_unparse() in #ifdef to avoid "-Wunused-function" on clang 3.4 or later.
Applied to -trivial, after adding a newline into the commit message :)
Thanks,
/mjt
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] vdi: wrapped uuid_unparse() in #ifdef
2014-10-31 8:02 [Qemu-devel] [PATCH] vdi: wrapped uuid_unparse() in #ifdef SeokYeon Hwang
2014-10-31 18:15 ` Stefan Weil
2014-11-02 5:14 ` Michael Tokarev
@ 2014-11-03 16:13 ` Paolo Bonzini
2 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2014-11-03 16:13 UTC (permalink / raw)
To: SeokYeon Hwang, qemu-devel; +Cc: qemu-trivial, sw
On 31/10/2014 09:02, SeokYeon Hwang wrote:
> Wrapped uuid_unparse() in #ifdef to avoid "-Wunused-function" on clang 3.4 or later.
>
> Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
> ---
> block/vdi.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/block/vdi.c b/block/vdi.c
> index 19701ee..e1d211c 100644
> --- a/block/vdi.c
> +++ b/block/vdi.c
> @@ -137,12 +137,14 @@ static inline int uuid_is_null(const uuid_t uu)
> return memcmp(uu, null_uuid, sizeof(uuid_t)) == 0;
> }
>
> +# if defined(CONFIG_VDI_DEBUG)
> static inline void uuid_unparse(const uuid_t uu, char *out)
> {
> snprintf(out, 37, UUID_FMT,
> uu[0], uu[1], uu[2], uu[3], uu[4], uu[5], uu[6], uu[7],
> uu[8], uu[9], uu[10], uu[11], uu[12], uu[13], uu[14], uu[15]);
> }
> +# endif
> #endif
>
> typedef struct {
>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-11-03 16:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-31 8:02 [Qemu-devel] [PATCH] vdi: wrapped uuid_unparse() in #ifdef SeokYeon Hwang
2014-10-31 18:15 ` Stefan Weil
2014-11-02 5:14 ` Michael Tokarev
2014-11-03 16:13 ` Paolo Bonzini
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).