Skip to content

Commit 84c6fe6

Browse files
[3.14] Fix warnings set but not used [-Wunused-but-set-variable] in remote_debug.h (GH-135290) (#135319)
Fix warnings `set but not used [-Wunused-but-set-variable]` in remote_debug.h (GH-135290) (cherry picked from commit 49fc1f2) Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
1 parent 79c86b1 commit 84c6fe6

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

Python/remote_debug.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -684,8 +684,6 @@ search_linux_map_for_section(proc_handle_t *handle, const char* secname, const c
684684
}
685685

686686
uintptr_t retval = 0;
687-
int lines_processed = 0;
688-
int matches_found = 0;
689687

690688
while (fgets(line + linelen, linesz - linelen, maps_file) != NULL) {
691689
linelen = strlen(line);
@@ -710,7 +708,6 @@ search_linux_map_for_section(proc_handle_t *handle, const char* secname, const c
710708
line[linelen - 1] = '\0';
711709
// and prepare to read the next line into the start of the buffer.
712710
linelen = 0;
713-
lines_processed++;
714711

715712
unsigned long start = 0;
716713
unsigned long path_pos = 0;
@@ -731,7 +728,6 @@ search_linux_map_for_section(proc_handle_t *handle, const char* secname, const c
731728
}
732729

733730
if (strstr(filename, substr)) {
734-
matches_found++;
735731
retval = search_elf_file_for_section(handle, secname, start, path);
736732
if (retval) {
737733
break;
@@ -850,15 +846,10 @@ search_windows_map_for_section(proc_handle_t* handle, const char* secname, const
850846
MODULEENTRY32W moduleEntry;
851847
moduleEntry.dwSize = sizeof(moduleEntry);
852848
void* runtime_addr = NULL;
853-
int modules_examined = 0;
854-
int matches_found = 0;
855849

856850
for (BOOL hasModule = Module32FirstW(hProcSnap, &moduleEntry); hasModule; hasModule = Module32NextW(hProcSnap, &moduleEntry)) {
857-
modules_examined++;
858-
859851
// Look for either python executable or DLL
860852
if (wcsstr(moduleEntry.szModule, substr)) {
861-
matches_found++;
862853
runtime_addr = analyze_pe(moduleEntry.szExePath, moduleEntry.modBaseAddr, secname);
863854
if (runtime_addr != NULL) {
864855
break;

0 commit comments

Comments
 (0)