mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 00:19:25 -05:00
Fix Clang warnings: ariable 'status' is used uninitialized
warning: variable 'status' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] else if(state_string == "away") ^~~~~~~~~~~~~~~~~~~~~~
This commit is contained in:
parent
a3a53b970d
commit
19196e2cb0
@ -234,7 +234,7 @@ void PeersHandler::handleSetStateString(Request& req, Response& resp)
|
|||||||
std::string state_string;
|
std::string state_string;
|
||||||
req.mStream << makeKeyValueReference("state_string", state_string);
|
req.mStream << makeKeyValueReference("state_string", state_string);
|
||||||
|
|
||||||
uint32_t status;
|
uint32_t status = RS_STATUS_OFFLINE;
|
||||||
if(state_string == "online")
|
if(state_string == "online")
|
||||||
status = RS_STATUS_ONLINE;
|
status = RS_STATUS_ONLINE;
|
||||||
else if(state_string == "busy")
|
else if(state_string == "busy")
|
||||||
|
Loading…
Reference in New Issue
Block a user