aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2017-08-28 10:28:58 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2017-08-28 10:28:58 +0900
commit72f7d49f89c14965be7d667f83a20c9d527708cb (patch)
tree498b1eb674e6a71af5a09f3554ea1aaae16705a3
parent5f85a2bfc5d5fee00fcdfb1230af32344376e39a (diff)
downloadlibquotient-72f7d49f89c14965be7d667f83a20c9d527708cb.tar.gz
libquotient-72f7d49f89c14965be7d667f83a20c9d527708cb.zip
Use -pedantic with compilers that support it
-rw-r--r--CMakeLists.txt6
-rw-r--r--logging.h2
-rw-r--r--util.h2
3 files changed, 7 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9254e029..5a345e06 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,7 +23,11 @@ endif()
CHECK_CXX_COMPILER_FLAG("-Wall" WALL_FLAG_SUPPORTED)
if ( WALL_FLAG_SUPPORTED AND NOT CMAKE_CXX_FLAGS MATCHES "(^| )-Wall($| )")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
-endif ( WALL_FLAG_SUPPORTED )
+endif ( )
+CHECK_CXX_COMPILER_FLAG("-Wpedantic" PEDANTIC_FLAG_SUPPORTED)
+if ( PEDANTIC_FLAG_SUPPORTED AND NOT CMAKE_CXX_FLAGS MATCHES "(^| )pedantic($| )")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wpedantic")
+endif ( )
if ( CMAKE_VERSION VERSION_LESS "3.1" )
CHECK_CXX_COMPILER_FLAG("-std=c++11" STD_FLAG_SUPPORTED)
diff --git a/logging.h b/logging.h
index e2a4c9a7..aaeceeac 100644
--- a/logging.h
+++ b/logging.h
@@ -50,7 +50,7 @@ namespace QMatrixClient
#else
return debug_object.noquote();
#endif
- };
+ }
/**
* @brief A helper operator to facilitate usage of formatJson (and possibly
diff --git a/util.h b/util.h
index c9e2d1c9..1f9e3f0b 100644
--- a/util.h
+++ b/util.h
@@ -232,7 +232,7 @@ namespace QMatrixClient
Dispatch<ResultT, ArgTs...> dispatch(ArgTs&& ... args)
{
return Dispatch<ResultT, ArgTs...>(std::forward<ArgTs...>(args)...);
- };
+ }
// The below enables pretty-printing of enums in logs
#if (QT_VERSION >= QT_VERSION_CHECK(5, 5, 0))