forked from osmocom/wireshark
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>
This commit is contained in:
parent
e01fcb7a3c
commit
5994c902b4
|
@ -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
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include <stdio.h>
|
||||
|
||||
int main()
|
||||
int main(void)
|
||||
{
|
||||
__int64 off=0;
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue