diff --git a/.clang-tidy b/.clang-tidy index 8ee8b690a0..1683ac36a1 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -6,6 +6,7 @@ Checks: [-*, modernize-make-unique, modernize-min-max-use-initializer-list, modernize-pass-by-value, + modernize-redundant-void-arg, # Enable a very limited number of the cppcoreguidelines checkers. # See the notes for some of the rest of them below. diff --git a/src/RE.cc b/src/RE.cc index d30c81d57f..5b3aa944ea 100644 --- a/src/RE.cc +++ b/src/RE.cc @@ -19,7 +19,7 @@ zeek::detail::NFA_Machine* zeek::detail::nfa = nullptr; bool zeek::detail::case_insensitive = false; bool zeek::detail::re_single_line = false; -extern int RE_parse(void); +extern int RE_parse(); extern void RE_set_input(const char* str); extern void RE_done_with_scan(); diff --git a/src/analyzer/protocol/bittorrent/BitTorrentTracker.cc b/src/analyzer/protocol/bittorrent/BitTorrentTracker.cc index dc4b8acce4..4e9398519a 100644 --- a/src/analyzer/protocol/bittorrent/BitTorrentTracker.cc +++ b/src/analyzer/protocol/bittorrent/BitTorrentTracker.cc @@ -195,7 +195,7 @@ void BitTorrentTracker_Analyzer::EndpointEOF(bool is_orig) { analyzer::tcp::TCP_ApplicationAnalyzer::EndpointEOF(is_orig); } -void BitTorrentTracker_Analyzer::InitBencParser(void) { +void BitTorrentTracker_Analyzer::InitBencParser() { benc_stack.clear(); benc_count.clear(); @@ -304,7 +304,7 @@ bool BitTorrentTracker_Analyzer::ParseRequest(char* line) { void BitTorrentTracker_Analyzer::RequestGet(char* uri) { req_val_uri = new StringVal(uri); } -void BitTorrentTracker_Analyzer::EmitRequest(void) { +void BitTorrentTracker_Analyzer::EmitRequest() { AnalyzerConfirmation(); if ( bt_tracker_request ) @@ -443,7 +443,7 @@ void BitTorrentTracker_Analyzer::ResponseBenc(int name_len, char* name, detail:: res_val_benc->Assign(std::move(name_), std::move(benc_value)); } -void BitTorrentTracker_Analyzer::ResponseBody(void) { +void BitTorrentTracker_Analyzer::ResponseBody() { switch ( ResponseParseBenc() ) { case 0: EmitResponse(); @@ -466,7 +466,7 @@ void BitTorrentTracker_Analyzer::ResponseBody(void) { } \ } -int BitTorrentTracker_Analyzer::ResponseParseBenc(void) { +int BitTorrentTracker_Analyzer::ResponseParseBenc() { auto INC_COUNT = [this]() { unsigned int count = benc_count.back(); benc_count.pop_back(); @@ -696,7 +696,7 @@ int BitTorrentTracker_Analyzer::ResponseParseBenc(void) { return -2; // need more data } -void BitTorrentTracker_Analyzer::EmitResponse(void) { +void BitTorrentTracker_Analyzer::EmitResponse() { AnalyzerConfirmation(); if ( bt_tracker_response )