summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-03-07 19:26:07 +0100
committerTycho <work.tycho+git@gmail.com>2014-03-07 19:26:07 +0100
commitb480148116ea7099c9a6afda83f74a3d45815a83 (patch)
tree0c2d81026e0b10f3be435e3d7e21528113b7e89f
parentMerge pull request #765 from worktycho/fastmath (diff)
downloadcuberite-b480148116ea7099c9a6afda83f74a3d45815a83.tar
cuberite-b480148116ea7099c9a6afda83f74a3d45815a83.tar.gz
cuberite-b480148116ea7099c9a6afda83f74a3d45815a83.tar.bz2
cuberite-b480148116ea7099c9a6afda83f74a3d45815a83.tar.lz
cuberite-b480148116ea7099c9a6afda83f74a3d45815a83.tar.xz
cuberite-b480148116ea7099c9a6afda83f74a3d45815a83.tar.zst
cuberite-b480148116ea7099c9a6afda83f74a3d45815a83.zip
-rw-r--r--SetFlags.cmake2
-rw-r--r--src/Bindings/LuaState.cpp1
-rw-r--r--src/Items/ItemHandler.h3
-rw-r--r--src/OSSupport/SocketThreads.h2
4 files changed, 6 insertions, 2 deletions
diff --git a/SetFlags.cmake b/SetFlags.cmake
index 6a8211fa2..35831e7e9 100644
--- a/SetFlags.cmake
+++ b/SetFlags.cmake
@@ -182,7 +182,7 @@ macro(set_exe_flags)
string(REPLACE "-w" "" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
string(REPLACE "-w" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
string(REPLACE "-w" "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
- add_flags_cxx("-Wall -Wextra")
+ add_flags_cxx("-Wall -Wextra -Werror -Wno-error=unused-parameter")
# we support non-IEEE 754 fpus so can make no guarentees about error
add_flags_cxx("-ffast-math")
diff --git a/src/Bindings/LuaState.cpp b/src/Bindings/LuaState.cpp
index 1890dcfe5..aa6ee05b3 100644
--- a/src/Bindings/LuaState.cpp
+++ b/src/Bindings/LuaState.cpp
@@ -677,6 +677,7 @@ void cLuaState::Push(Vector3i * a_Vector)
void cLuaState::Push(void * a_Ptr)
{
+ UNUSED(a_Ptr);
ASSERT(IsValid());
// Investigate the cause of this - what is the callstack?
diff --git a/src/Items/ItemHandler.h b/src/Items/ItemHandler.h
index ef3f37a7a..5b6c239cc 100644
--- a/src/Items/ItemHandler.h
+++ b/src/Items/ItemHandler.h
@@ -21,6 +21,9 @@ class cItemHandler
public:
cItemHandler(int a_ItemType);
+ // Force virtual destructor
+ virtual ~cItemHandler() {}
+
/// Called when the player tries to use the item (right mouse button). Return false to make the item unusable. DEFAULT: False
virtual bool OnItemUse(cWorld * a_World, cPlayer * a_Player, const cItem & a_Item, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_Dir);
diff --git a/src/OSSupport/SocketThreads.h b/src/OSSupport/SocketThreads.h
index fcd2ce11f..b2eb5950f 100644
--- a/src/OSSupport/SocketThreads.h
+++ b/src/OSSupport/SocketThreads.h
@@ -103,7 +103,7 @@ private:
public:
cSocketThread(cSocketThreads * a_Parent);
- ~cSocketThread();
+ virtual ~cSocketThread();
// All these methods assume parent's m_CS is locked
bool HasEmptySlot(void) const {return m_NumSlots < MAX_SLOTS; }