diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-02-21 11:23:38 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-02-21 11:23:38 +0200 |
commit | 826f49485e135835f9a83c994a874a8eeee2831a (patch) | |
tree | 49d4051e2f0fbf5e36c32ff1ec1a73cd40e08d43 | |
parent | Merge pull request #1724 (diff) | |
parent | daemon: silence spurious warning about uninitialized variable (diff) | |
download | monero-826f49485e135835f9a83c994a874a8eeee2831a.tar.xz |
Merge pull request #1716
b560ed4a daemon: silence spurious warning about uninitialized variable (moneromooo-monero)
-rw-r--r-- | src/daemon/daemon.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/daemon/daemon.cpp b/src/daemon/daemon.cpp index 19013cbc8..670c33128 100644 --- a/src/daemon/daemon.cpp +++ b/src/daemon/daemon.cpp @@ -124,18 +124,18 @@ bool t_daemon::run(bool interactive) return false; mp_internals->rpc.run(); - daemonize::t_command_server* rpc_commands; + std::unique_ptr<daemonize::t_command_server> rpc_commands; if (interactive) { // The first three variables are not used when the fourth is false - rpc_commands = new daemonize::t_command_server(0, 0, boost::none, false, mp_internals->rpc.get_server()); + rpc_commands.reset(new daemonize::t_command_server(0, 0, boost::none, false, mp_internals->rpc.get_server())); rpc_commands->start_handling(std::bind(&daemonize::t_daemon::stop_p2p, this)); } mp_internals->p2p.run(); // blocks until p2p goes down - if (interactive) + if (rpc_commands) { rpc_commands->stop_handling(); } |