diff options
author | Joakim Karlsson <oakimk@gmail.com> | 2018-04-24 20:20:33 +0200 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-04-24 19:19:23 +0000 |
commit | 5994c902b452f038df82a7497d1561503c3e1fe0 (patch) | |
tree | 8c56e025185e49e6f92d5d882eb4f92b252b94a2 | |
parent | e01fcb7a3cc37cb7474563521f09211b58bfe02b (diff) |
cmake: remove warnings -Werror=old-style-definition
see https://cmake.org/Bug/bug_relationship_graph.php?bug_id=15058
Change-Id: I325f476b145a542e987a13bedd1f95a7d8faba94
Reviewed-on: https://code.wireshark.org/review/27121
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r-- | ConfigureChecks.cmake | 8 | ||||
-rw-r--r-- | cmake/TestWindowsFSeek.c | 2 | ||||
-rw-r--r-- | cmake/modules/CheckCLinkerFlag.cmake | 2 | ||||
-rw-r--r-- | cmake/modules/CheckCXXCompilerFlag.cmake | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 3ef2351ca7..421fcf13e4 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -140,7 +140,7 @@ check_symbol_exists(tzname "time.h" HAVE_TZNAME) if (NL_FOUND) check_c_source_compiles( "#include <linux/nl80211.h> - int main() { + int main(void) { int x = NL80211_FREQUENCY_ATTR_MAX_TX_POWER; x |= NL80211_ATTR_SUPPORTED_IFTYPES; x |= NL80211_ATTR_SUPPORTED_COMMANDS; @@ -152,21 +152,21 @@ if (NL_FOUND) ) check_c_source_compiles( "#include <linux/nl80211.h> - int main() { + int main(void) { enum nl80211_commands x = NL80211_CMD_SET_CHANNEL; }" HAVE_NL80211_CMD_SET_CHANNEL ) check_c_source_compiles( "#include <linux/nl80211.h> - int main() { + int main(void) { enum nl80211_protocol_features x = NL80211_PROTOCOL_FEATURE_SPLIT_WIPHY_DUMP; }" HAVE_NL80211_SPLIT_WIPHY_DUMP ) check_c_source_compiles( "#include <linux/nl80211.h> - int main() { + int main(void) { enum nl80211_attrs x = NL80211_ATTR_VHT_CAPABILITY; }" HAVE_NL80211_VHT_CAPABILITY diff --git a/cmake/TestWindowsFSeek.c b/cmake/TestWindowsFSeek.c index 8f448a0c09..45ae2c40ea 100644 --- a/cmake/TestWindowsFSeek.c +++ b/cmake/TestWindowsFSeek.c @@ -8,7 +8,7 @@ #include <stdio.h> -int main() +int main(void) { __int64 off=0; diff --git a/cmake/modules/CheckCLinkerFlag.cmake b/cmake/modules/CheckCLinkerFlag.cmake index 283c188141..fa24e7c42d 100644 --- a/cmake/modules/CheckCLinkerFlag.cmake +++ b/cmake/modules/CheckCLinkerFlag.cmake @@ -52,7 +52,7 @@ MACRO (CHECK_C_LINKER_FLAG _FLAG _RESULT) "-Werror=unused-command-line-argument ${CMAKE_REQUIRED_LIBRARIES}") endif() message(status "check linker flag - test linker flags: ${_FLAG}") - check_c_source_compiles("int main() { return 0;}" ${_RESULT}) + check_c_source_compiles("int main(void) { return 0;}" ${_RESULT}) set(CMAKE_REQUIRED_LIBRARIES "${save_CMAKE_REQUIRED_LIBRARIES}") ENDMACRO (CHECK_C_LINKER_FLAG) diff --git a/cmake/modules/CheckCXXCompilerFlag.cmake b/cmake/modules/CheckCXXCompilerFlag.cmake index 7204219663..ca87568dbb 100644 --- a/cmake/modules/CheckCXXCompilerFlag.cmake +++ b/cmake/modules/CheckCXXCompilerFlag.cmake @@ -32,7 +32,7 @@ macro (CHECK_CXX_COMPILER_FLAG _FLAG _RESULT) set(_CheckCXXCompilerFlag_SAVED_${v} "$ENV{${v}}") set(ENV{${v}} C) endforeach() - CHECK_CXX_SOURCE_COMPILES("int main() { return 0; }" ${_RESULT} + CHECK_CXX_SOURCE_COMPILES("int main(void) { return 0; }" ${_RESULT} # Some compilers do not fail with a bad flag FAIL_REGEX "command line option .* is valid for .* but not for C\\\\+\\\\+" # GNU FAIL_REGEX "unrecognized .*option" # GNU |