diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/DeadlockDetect.cpp | 1 | ||||
-rw-r--r-- | src/Defines.h | 3 | ||||
-rw-r--r-- | src/Map.cpp | 4 | ||||
-rw-r--r-- | src/Scoreboard.cpp | 6 | ||||
-rw-r--r-- | src/StringUtils.cpp | 1 | ||||
-rw-r--r-- | src/main.cpp | 1 |
7 files changed, 12 insertions, 5 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0f0db9c80..448dc4b70 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -16,6 +16,7 @@ if (NOT MSVC) #lib dependecies are not included set(BINDING_DEPENDECIES + tolua ${CMAKE_CURRENT_SOURCE_DIR}/Bindings/virtual_method_hooks.lua ${CMAKE_CURRENT_SOURCE_DIR}/Bindings/AllToLua.pkg Bindings/LuaFunctions.h diff --git a/src/DeadlockDetect.cpp b/src/DeadlockDetect.cpp index c42d09b89..4dc7bfde6 100644 --- a/src/DeadlockDetect.cpp +++ b/src/DeadlockDetect.cpp @@ -121,7 +121,6 @@ void cDeadlockDetect::CheckWorldAge(const AString & a_WorldName, Int64 a_Age) if (itr->second.m_NumCyclesSame > (1000 * m_IntervalSec) / CYCLE_MILLISECONDS) { DeadlockDetected(); - return; } } else diff --git a/src/Defines.h b/src/Defines.h index 38411c69d..1a8b3fa4a 100644 --- a/src/Defines.h +++ b/src/Defines.h @@ -290,7 +290,10 @@ inline AString BlockFaceToString(eBlockFace a_BlockFace) case BLOCK_FACE_ZP: return "BLOCK_FACE_ZP"; case BLOCK_FACE_NONE: return "BLOCK_FACE_NONE"; } + // clang optimisises this line away then warns that it has done so. + #if !defined(__clang__) return Printf("Unknown BLOCK_FACE: %d", a_BlockFace); + #endif } diff --git a/src/Map.cpp b/src/Map.cpp index 2d8f57168..79370b097 100644 --- a/src/Map.cpp +++ b/src/Map.cpp @@ -243,7 +243,7 @@ bool cMap::UpdatePixel(unsigned int a_X, unsigned int a_Z) { for (unsigned int Z = m_RelZ; Z < m_RelZ + PixelWidth; ++Z) { - unsigned int WaterDepth = 0; + // unsigned int WaterDepth = 0; BLOCKTYPE TargetBlock = E_BLOCK_AIR; NIBBLETYPE TargetMeta = 0; @@ -261,12 +261,14 @@ bool cMap::UpdatePixel(unsigned int a_X, unsigned int a_Z) continue; } // TODO 2014-02-22 xdot: Check if block is liquid + /* else if (false) { --Height; ++WaterDepth; continue; } + */ break; } diff --git a/src/Scoreboard.cpp b/src/Scoreboard.cpp index 8088e624b..4c89ce265 100644 --- a/src/Scoreboard.cpp +++ b/src/Scoreboard.cpp @@ -30,9 +30,13 @@ AString cObjective::TypeToString(eType a_Type) case otStatBlockMine: return "stat.mineBlock"; case otStatEntityKill: return "stat.killEntity"; case otStatEntityKilledBy: return "stat.entityKilledBy"; - + + // clang optimisises this line away then warns that it has done so. + #if !defined(__clang__) default: return ""; + #endif } + } diff --git a/src/StringUtils.cpp b/src/StringUtils.cpp index 3f9275798..ad622d707 100644 --- a/src/StringUtils.cpp +++ b/src/StringUtils.cpp @@ -454,7 +454,6 @@ AString & UTF8ToRawBEUTF16(const char * a_UTF8, size_t a_UTF8Length, AString & a if (!isLegalUTF8(source, extraBytesToRead + 1)) { return a_UTF16; - break; } // The cases all fall through. See "Note A" below. diff --git a/src/main.cpp b/src/main.cpp index 2ae8a413b..68eea7f4d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -72,7 +72,6 @@ void NonCtrlHandler(int a_Signal) LOGERROR(" D: | MCServer has encountered an error and needs to close"); LOGERROR("Details | SIGABRT: Server self-terminated due to an internal fault"); exit(EXIT_FAILURE); - break; } case SIGINT: case SIGTERM: |