From 4e3adeb4c0d7b835fcd157441c253ce482974644 Mon Sep 17 00:00:00 2001 From: Huang-Ming Huang Date: Wed, 18 Dec 2024 13:16:43 -0600 Subject: [PATCH] fix clang-tidy-19 problem --- .clang-tidy | 1 - include/boost/ut.hpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index f73c8be1..44e19644 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -25,7 +25,6 @@ readability-*,\ " WarningsAsErrors: '' HeaderFilterRegex: '.*' -AnalyzeTemporaryDtors: false FormatStyle: file User: clausklein ... diff --git a/include/boost/ut.hpp b/include/boost/ut.hpp index 6059292d..878c6475 100644 --- a/include/boost/ut.hpp +++ b/include/boost/ut.hpp @@ -822,7 +822,7 @@ struct cfg { } query_pattern = ""; bool found_first_option = false; - for (auto i = 1U; i < n_args; i++) { + for (auto i = 1U; i < n_args && argv != nullptr; i++) { std::string cmd(argv[i]); auto cmd_option = find_arg(cmd); if (!cmd_option.has_value()) {