Fix may be used uninitialized warnings

This commit is contained in:
Brad Chase
2017-03-21 19:14:07 -04:00
parent c453df927f
commit b958fa413e
2 changed files with 5 additions and 5 deletions

View File

@@ -151,8 +151,8 @@ public:
void doClean (Json::Value const& params) override void doClean (Json::Value const& params) override
{ {
LedgerIndex minRange; LedgerIndex minRange = 0;
LedgerIndex maxRange; LedgerIndex maxRange = 0;
app_.getLedgerMaster().getFullValidatedRange (minRange, maxRange); app_.getLedgerMaster().getFullValidatedRange (minRange, maxRange);
{ {

View File

@@ -110,7 +110,7 @@ namespace {
*/ */
error_code_i fillHandler (Context& context, error_code_i fillHandler (Context& context,
boost::optional<Handler const&>& result) Handler const * & result)
{ {
if (! isUnlimited (context.role)) if (! isUnlimited (context.role))
{ {
@@ -184,7 +184,7 @@ error_code_i fillHandler (Context& context,
return rpcNO_CLOSED; return rpcNO_CLOSED;
} }
result = *handler; result = handler;
return rpcSUCCESS; return rpcSUCCESS;
} }
@@ -232,7 +232,7 @@ void getResult (
Status doCommand ( Status doCommand (
RPC::Context& context, Json::Value& result) RPC::Context& context, Json::Value& result)
{ {
boost::optional <Handler const&> handler; Handler const * handler = nullptr;
if (auto error = fillHandler (context, handler)) if (auto error = fillHandler (context, handler))
{ {
inject_error (error, result); inject_error (error, result);