diff options
-rw-r--r-- | CHANGELOG.txt | 2 | ||||
-rw-r--r-- | bowshock/CMakeLists.txt | 10 | ||||
-rw-r--r-- | bowshock/source/ini/bow/cmpshdprg.cxx | 2 | ||||
-rw-r--r-- | bowshock/source/ini/bow/ini.cxx | 2 | ||||
-rw-r--r-- | bowshock/source/ini/bow/lop.cxx | 2 | ||||
-rw-r--r-- | bowshock/source/ini/bow/polevt.cxx | 2 |
6 files changed, 15 insertions, 5 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt index b8086cc..073a19f 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -20,6 +20,8 @@ * Make cmpshd static; * Rename crd to prcrd; +* Enable more warnings; + # 0.B.2 * Fix data directory not being set correctly by CMake; diff --git a/bowshock/CMakeLists.txt b/bowshock/CMakeLists.txt index ed404e7..8d25d90 100644 --- a/bowshock/CMakeLists.txt +++ b/bowshock/CMakeLists.txt @@ -86,9 +86,17 @@ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang|GNU") $<IF:$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">,-Og,-Ofast> -Wall + -Wdouble-promotion -Wextra - -Wmissing-prototypes + -Wfloat-equal + -Wformat=2 + -Winvalid-utf8 + -Wmissing-declarations + -Wmissing-include-dirs + -Wnull-dereference -Wpedantic + -Wpointer-arith + -Wstrict-overflow=5 -fdiagnostics-color=always -g ) diff --git a/bowshock/source/ini/bow/cmpshdprg.cxx b/bowshock/source/ini/bow/cmpshdprg.cxx index 87b8446..40f5f3a 100644 --- a/bowshock/source/ini/bow/cmpshdprg.cxx +++ b/bowshock/source/ini/bow/cmpshdprg.cxx @@ -15,7 +15,7 @@ namespace bow { } static auto ::bow::cmpshd(::GLuint & shd,char const * const nam,::GLenum const typ) -> void { - char const * typstr; + /*[[maybe_unused]]*/ char const * typstr; char const * typExt; ::zp::siz typExtLen; diff --git a/bowshock/source/ini/bow/ini.cxx b/bowshock/source/ini/bow/ini.cxx index 6c8dcec..21db1ef 100644 --- a/bowshock/source/ini/bow/ini.cxx +++ b/bowshock/source/ini/bow/ini.cxx @@ -19,7 +19,7 @@ auto ::bow::bow::ini(int const argc,char const * const * const argv) noexcept -> bow_logdbg("debug mode is enabled"); bow_logdbg("data directory at \"" bow_datdir "\""); - bow_logdbg("angle unit: %.3f radians",0x1p0f); + bow_logdbg("angle unit: %.3f radians",0x1p0); bow_logdbg("distance unit: %.3f metres",::bow::dstmod); bow_logdbg("mass unit: %.3f kilograms",::bow::masmod); bow_logdbg("time unit: %.3f seconds",::bow::timmod); diff --git a/bowshock/source/ini/bow/lop.cxx b/bowshock/source/ini/bow/lop.cxx index 7c9c120..3aec774 100644 --- a/bowshock/source/ini/bow/lop.cxx +++ b/bowshock/source/ini/bow/lop.cxx @@ -84,7 +84,7 @@ auto ::bow::bow::lop() noexcept -> void { ::bow::mov(sysRoot); ::bow::mov(objroot); - ::GLfloat const frm = 0x1p0*plydat.zom; + ::GLfloat const frm = 0x1p0f*plydat.zom; vtx[0x0u] = (::GLfloat)sysRoot.objs->nxt->pos.x/frm; vtx[0x1u] = (::GLfloat)sysRoot.objs->nxt->pos.y/frm; diff --git a/bowshock/source/ini/bow/polevt.cxx b/bowshock/source/ini/bow/polevt.cxx index 7b0d093..c5aa3c7 100644 --- a/bowshock/source/ini/bow/polevt.cxx +++ b/bowshock/source/ini/bow/polevt.cxx @@ -12,7 +12,7 @@ auto ::bow::bow::polevt() noexcept -> bool { ::glfwSetWindowShouldClose(gfxdat.win,GLFW_TRUE); } - if (::glfwWindowShouldClose(gfxdat.win)) [[unlikely]] return true; + if (::glfwWindowShouldClose(gfxdat.win)) [[unlikely]] {return true;} return false; } |