diff options
author | David Neto <dneto@google.com> | 2019-07-08 13:53:33 -0400 |
---|---|---|
committer | David Neto <dneto@google.com> | 2019-07-08 13:53:33 -0400 |
commit | 8bf4e0ad584cbeb6fce2a0da1b2ab2f971bfb9c3 (patch) | |
tree | 9d8891a0b4392efa20424ab2744694cfcab0c029 | |
parent | b83b58d177b797edd1f94c5f10837f2cc2863f0a (diff) | |
download | effcee-8bf4e0ad584cbeb6fce2a0da1b2ab2f971bfb9c3.tar.gz |
Add Clang warning -Wextra-semi
Also remove the one extra semicolon it found.
-rw-r--r-- | cmake/utils.cmake | 3 | ||||
-rw-r--r-- | effcee/cursor.h | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/cmake/utils.cmake b/cmake/utils.cmake index 291be3c..19e81f2 100644 --- a/cmake/utils.cmake +++ b/cmake/utils.cmake @@ -37,6 +37,9 @@ function(effcee_default_c_compile_options TARGET) if (UNIX AND NOT MINGW) target_link_libraries(${TARGET} PUBLIC -pthread) endif() + if (${CMAKE_C_COMPILER_ID} MATCHES "Clang") + target_compile_options(${TARGET} PRIVATE -Wextra-semi) + endif() else() # disable warning C4800: 'int' : forcing value to bool 'true' or 'false' # (performance warning) diff --git a/effcee/cursor.h b/effcee/cursor.h index 82133f9..7776b7c 100644 --- a/effcee/cursor.h +++ b/effcee/cursor.h @@ -60,7 +60,7 @@ class Cursor { ++line_num_; } return *this; - }; + } private: // The remaining text, after all previous advancements. References the |