diff options
author | Peter Powell <petpow@saberuk.com> | 2014-10-06 13:30:31 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2014-10-13 06:18:10 +0100 |
commit | 402a1bb010522a35600325c1a3084e092b40ca22 (patch) | |
tree | 5c276225f1c2d6758ae813e14a744b816f1ece2d /src/server.cpp | |
parent | 529d26bdafb033a3f90691d21f609067261bb953 (diff) |
Fix various warnings when building with LLVM 3.5.
- warning: absolute value function 'abs' given an argument of type 'long' but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value]
- warning: 'this' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to true [-Wundefined-bool-conversion]
Diffstat (limited to 'src/server.cpp')
-rw-r--r-- | src/server.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/server.cpp b/src/server.cpp index 4741f942d..d05ece8a4 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -46,13 +46,10 @@ void InspIRCd::Exit(int status) #ifdef _WIN32 SetServiceStopped(status); #endif - if (this) - { - this->SendError("Exiting with status " + ConvToStr(status) + " (" + std::string(ExitCodes[status]) + ")"); - this->Cleanup(); - delete this; - ServerInstance = NULL; - } + this->SendError("Exiting with status " + ConvToStr(status) + " (" + std::string(ExitCodes[status]) + ")"); + this->Cleanup(); + delete this; + ServerInstance = NULL; exit (status); } |