fix -Wunused-but-set-variable

This commit is contained in:
2025-07-10 00:59:19 +08:00
parent 45ed380e7c
commit 85b48a9eef

View File

@@ -60,15 +60,14 @@ terminal_is_cmd()
DWORD exe_path_size = MAX_PATH;
DWORD ppid = GetCurrentProcessId();
DWORD error = 0;
while (ppid != 0) {
DWORD pid = ppid;
ppid = get_parent_pid(pid);
exe_path_size = MAX_PATH;
error = get_process_name(ppid, exe_path, &exe_path_size);
get_process_name(ppid, exe_path, &exe_path_size);
// DWORD error = get_process_name(ppid, exe_path, &exe_path_size);
// fmt::print(
// "PID={}; PPID={}; Err={}; EXE='{}'\n",
// pid,