fix -Wunused-but-set-variable

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

View File

@@ -59,16 +59,15 @@ terminal_is_cmd()
char* exe_path = new char[MAX_PATH]; char* exe_path = new char[MAX_PATH];
DWORD exe_path_size = MAX_PATH; DWORD exe_path_size = MAX_PATH;
DWORD ppid = GetCurrentProcessId(); DWORD ppid = GetCurrentProcessId();
DWORD error = 0;
while (ppid != 0) { while (ppid != 0) {
DWORD pid = ppid; DWORD pid = ppid;
ppid = get_parent_pid(pid); ppid = get_parent_pid(pid);
exe_path_size = MAX_PATH; 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( // fmt::print(
// "PID={}; PPID={}; Err={}; EXE='{}'\n", // "PID={}; PPID={}; Err={}; EXE='{}'\n",
// pid, // pid,