From bd60df527c782d8c907d8e2ea8bdb172860da8b0 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 18 Feb 2026 14:37:33 +0100 Subject: [PATCH] clang-tidy: check `readability-redundant-control-flow` Also fix fallouts. Ref: https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-control-flow.html Closes #20625 --- .clang-tidy.yml | 3 ++- docs/examples/synctime.c | 1 - tests/server/tftpd.c | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.clang-tidy.yml b/.clang-tidy.yml index 539acdd7c3..36c117c3e0 100644 --- a/.clang-tidy.yml +++ b/.clang-tidy.yml @@ -15,4 +15,5 @@ Checks: >- bugprone-suspicious-realloc-usage, misc-const-correctness, portability-*, - readability-named-parameter + readability-named-parameter, + readability-redundant-control-flow diff --git a/docs/examples/synctime.c b/docs/examples/synctime.c index b9fc30c06c..48751b92c9 100644 --- a/docs/examples/synctime.c +++ b/docs/examples/synctime.c @@ -211,7 +211,6 @@ static void showUsage(void) " port.\n"); fprintf(stderr, " --help Print this help.\n"); fprintf(stderr, "\n"); - return; } int main(int argc, const char *argv[]) diff --git a/tests/server/tftpd.c b/tests/server/tftpd.c index 638a1350ca..d4f2b01601 100644 --- a/tests/server/tftpd.c +++ b/tests/server/tftpd.c @@ -878,7 +878,6 @@ abort: curlx_close(test->ofile); test->ofile = 0; } - return; } /*