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-28 21:30:44 +01:00
parent 4a41dd4068
commit fbd7c359ee
3 changed files with 25 additions and 26 deletions
+2 -2
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)) \