[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 10/14] Zero json struct with memset() instea of = {}
From: |
Jes . Sorensen |
Subject: |
[Qemu-devel] [PATCH 10/14] Zero json struct with memset() instea of = {} to keep compiler happy. |
Date: |
Mon, 30 Aug 2010 17:35:43 +0200 |
From: Jes Sorensen <address@hidden>
This keeps the compiler happy when building with -Wextra while
effectively generating the same code.
Signed-off-by: Jes Sorensen <address@hidden>
---
qjson.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/qjson.c b/qjson.c
index e4ee433..f259547 100644
--- a/qjson.c
+++ b/qjson.c
@@ -36,8 +36,9 @@ static void parse_json(JSONMessageParser *parser, QList
*tokens)
QObject *qobject_from_jsonv(const char *string, va_list *ap)
{
- JSONParsingState state = {};
+ JSONParsingState state;
+ memset(&state, 0, sizeof(state));
state.ap = ap;
json_message_parser_init(&state.parser, parse_json);
--
1.7.2.2
- [Qemu-devel] [PATCH 00/14] gcc extra warning fixes, Jes . Sorensen, 2010/08/30
- [Qemu-devel] [PATCH 01/14] Remove unused argument for nbd_client(), Jes . Sorensen, 2010/08/30
- [Qemu-devel] [PATCH 06/14] Remove unused argument for encrypt_sectors(), Jes . Sorensen, 2010/08/30
- [Qemu-devel] [PATCH 05/14] Remove unused argument for check_for_block_signature(), Jes . Sorensen, 2010/08/30
- [Qemu-devel] [PATCH 08/14] Remove unused argument for qcow2_encrypt_sectors(), Jes . Sorensen, 2010/08/30
- [Qemu-devel] [PATCH 09/14] Remove unused arguments for add_aio_request() and free_aio_req(), Jes . Sorensen, 2010/08/30
- [Qemu-devel] [PATCH 10/14] Zero json struct with memset() instea of = {} to keep compiler happy.,
Jes . Sorensen <=
- Re: [Qemu-devel] Re: [PATCH 10/14] Zero json struct with memset() instea of = {} to keep compiler happy., malc, 2010/08/30
- Re: [Qemu-devel] Re: [PATCH 10/14] Zero json struct with memset() instea of = {} to keep compiler happy., Richard Henderson, 2010/08/30
[Qemu-devel] Re: [PATCH 10/14] Zero json struct with memset() instea of = {} to keep compiler happy., Paolo Bonzini, 2010/08/30