mirror of
https://github.com/monero-project/monero.git
synced 2025-06-22 09:04:12 -04:00
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:
parent
4a41dd4068
commit
fbd7c359ee
3 changed files with 25 additions and 26 deletions
|
@ -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)) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue