diff options
author | Loic Blot <loic.blot@unix-experience.fr> | 2018-04-04 08:40:21 +0200 |
---|---|---|
committer | Loic Blot <loic.blot@unix-experience.fr> | 2018-04-04 08:40:31 +0200 |
commit | 5070ca2111dd5b3f333a942059ef2c592de8dc24 (patch) | |
tree | 3d3076cbc571d2c210a9b0714ea13ed327d85786 /src/server.cpp | |
parent | 8e0b80aa369df7d1142053f077df928106c6ce8c (diff) | |
download | minetest-5070ca2111dd5b3f333a942059ef2c592de8dc24.tar.gz minetest-5070ca2111dd5b3f333a942059ef2c592de8dc24.tar.bz2 minetest-5070ca2111dd5b3f333a942059ef2c592de8dc24.zip |
Fix 5 issues reported by PVS studio
* src/sky.cpp 146 warn V519 The 'suncolor_f.r' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 142, 146.
* src/sky.cpp 147 warn V519 The 'suncolor_f.g' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 143, 147.
* src/sky.cpp 148 warn V519 The 'suncolor_f.b' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 144, 148.
* src/threading/thread.cpp 63 err V730 Not all members of a class are initialized inside the constructor. Consider inspecting: m_thread_obj.
* src/server.cpp 3243 err V595 The 'log' pointer was utilized before it was verified against nullptr. Check lines: 3243, 3258.
Diffstat (limited to 'src/server.cpp')
-rw-r--r-- | src/server.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server.cpp b/src/server.cpp index e0a15ab87..5bdf22c7e 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -3237,7 +3237,8 @@ bool Server::rollbackRevertActions(const std::list<RollbackAction> &actions, ServerMap *map = (ServerMap*)(&m_env->getMap()); // Fail if no actions to handle - if(actions.empty()){ + if (actions.empty()) { + assert(log); log->push_back("Nothing to do."); return false; } |