From 59f4ae06d0c654009abe8b55543a7ff955aa2a94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Thu, 5 Oct 2023 22:30:34 +0200 Subject: [PATCH] Fix clang-tidy `clang-analyzer-optin.portability.UnixAPI` Assumes that `argc` is `0`, which is impossible. --- src/base/system.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/base/system.cpp b/src/base/system.cpp index 5906e4fad..21f86a050 100644 --- a/src/base/system.cpp +++ b/src/base/system.cpp @@ -4015,6 +4015,7 @@ void cmdline_fix(int *argc, const char ***argv) int wide_argc = 0; WCHAR **wide_argv = CommandLineToArgvW(GetCommandLineW(), &wide_argc); dbg_assert(wide_argv != NULL, "CommandLineToArgvW failure"); + dbg_assert(wide_argc > 0, "Invalid argc value"); int total_size = 0;