mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-30 07:25:50 +00:00
Fix may be used uninitialized warnings
This commit is contained in:
@@ -151,8 +151,8 @@ public:
|
||||
|
||||
void doClean (Json::Value const& params) override
|
||||
{
|
||||
LedgerIndex minRange;
|
||||
LedgerIndex maxRange;
|
||||
LedgerIndex minRange = 0;
|
||||
LedgerIndex maxRange = 0;
|
||||
app_.getLedgerMaster().getFullValidatedRange (minRange, maxRange);
|
||||
|
||||
{
|
||||
|
||||
@@ -110,7 +110,7 @@ namespace {
|
||||
*/
|
||||
|
||||
error_code_i fillHandler (Context& context,
|
||||
boost::optional<Handler const&>& result)
|
||||
Handler const * & result)
|
||||
{
|
||||
if (! isUnlimited (context.role))
|
||||
{
|
||||
@@ -184,7 +184,7 @@ error_code_i fillHandler (Context& context,
|
||||
return rpcNO_CLOSED;
|
||||
}
|
||||
|
||||
result = *handler;
|
||||
result = handler;
|
||||
return rpcSUCCESS;
|
||||
}
|
||||
|
||||
@@ -232,7 +232,7 @@ void getResult (
|
||||
Status doCommand (
|
||||
RPC::Context& context, Json::Value& result)
|
||||
{
|
||||
boost::optional <Handler const&> handler;
|
||||
Handler const * handler = nullptr;
|
||||
if (auto error = fillHandler (context, handler))
|
||||
{
|
||||
inject_error (error, result);
|
||||
|
||||
Reference in New Issue
Block a user