wallet: fix some "may be used uninitialized" warnings

The compiler can't always work out the _found booleans are
set iff the value is initialized.
This commit is contained in:
moneromooo-monero 2016-08-27 13:45:33 +01:00
parent 4a41dd4068
commit fbd7c359ee
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
3 changed files with 25 additions and 26 deletions

View file

@ -28,8 +28,8 @@
#pragma once
#define GET_FIELD_FROM_JSON_RETURN_ON_ERROR(json, name, type, jtype, mandatory) \
type field_##name; \
#define GET_FIELD_FROM_JSON_RETURN_ON_ERROR(json, name, type, jtype, mandatory, def) \
type field_##name = def; \
bool field_##name##_found = false; \
(void)field_##name##_found; \
do if (json.HasMember(#name)) \