diff options
author | Brad King <brad.king@kitware.com> | 2021-10-27 13:24:42 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-10-27 13:24:54 (GMT) |
commit | a956be484783a991dbda3b14f676538d5f0b17bd (patch) | |
tree | 1c719f7e81e3d64916e1fcf219cdd6937a4c3935 /Tests/CMakeLib/testOptional.cxx | |
parent | db422ae0c7b3b871c067c9afcd2b0d8a43376ff6 (diff) | |
parent | 7e4e192ce2a579c22120150953df5adf26435eef (diff) | |
download | CMake-a956be484783a991dbda3b14f676538d5f0b17bd.zip CMake-a956be484783a991dbda3b14f676538d5f0b17bd.tar.gz CMake-a956be484783a991dbda3b14f676538d5f0b17bd.tar.bz2 |
Merge topic 'warnings-cleanup'
7e4e192ce2 Source: fix clang-tidy modernize-redundant-void-arg warning
8d671dd94c Source: fix more -Wmissing-prototypes warnings
1cf14f8c03 Source: fix many -Wmissing-prototypes warnings by marking functions static
319944b3d2 Source: fix some -Wunused-macros warnings
5257d9e71a Source: fix only -Wshorten-64-to-32 warning with explicit cast
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6648
Diffstat (limited to 'Tests/CMakeLib/testOptional.cxx')
-rw-r--r-- | Tests/CMakeLib/testOptional.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Tests/CMakeLib/testOptional.cxx b/Tests/CMakeLib/testOptional.cxx index 9d4b72a..2007fff 100644 --- a/Tests/CMakeLib/testOptional.cxx +++ b/Tests/CMakeLib/testOptional.cxx @@ -116,7 +116,7 @@ public: # define END_IGNORE_UNINITIALIZED #endif -void swap(EventLogger& e1, EventLogger& e2) +static void swap(EventLogger& e1, EventLogger& e2) { BEGIN_IGNORE_UNINITIALIZED events.push_back({ Event::SWAP, &e1, &e2, e2.Value }); @@ -180,37 +180,37 @@ EventLogger& EventLogger::operator=(int value) return *this; } -bool operator==(const EventLogger& lhs, const EventLogger& rhs) +static bool operator==(const EventLogger& lhs, const EventLogger& rhs) { events.push_back({ Event::COMPARE_EE_EQ, &lhs, &rhs, lhs.Value }); return lhs.Value == rhs.Value; } -bool operator!=(const EventLogger& lhs, const EventLogger& rhs) +static bool operator!=(const EventLogger& lhs, const EventLogger& rhs) { events.push_back({ Event::COMPARE_EE_NE, &lhs, &rhs, lhs.Value }); return lhs.Value != rhs.Value; } -bool operator<(const EventLogger& lhs, const EventLogger& rhs) +static bool operator<(const EventLogger& lhs, const EventLogger& rhs) { events.push_back({ Event::COMPARE_EE_LT, &lhs, &rhs, lhs.Value }); return lhs.Value < rhs.Value; } -bool operator<=(const EventLogger& lhs, const EventLogger& rhs) +static bool operator<=(const EventLogger& lhs, const EventLogger& rhs) { events.push_back({ Event::COMPARE_EE_LE, &lhs, &rhs, lhs.Value }); return lhs.Value <= rhs.Value; } -bool operator>(const EventLogger& lhs, const EventLogger& rhs) +static bool operator>(const EventLogger& lhs, const EventLogger& rhs) { events.push_back({ Event::COMPARE_EE_GT, &lhs, &rhs, lhs.Value }); return lhs.Value > rhs.Value; } -bool operator>=(const EventLogger& lhs, const EventLogger& rhs) +static bool operator>=(const EventLogger& lhs, const EventLogger& rhs) { events.push_back({ Event::COMPARE_EE_GE, &lhs, &rhs, lhs.Value }); return lhs.Value >= rhs.Value; |