mirror of
https://github.com/python/cpython.git
synced 2025-10-28 04:04:44 +00:00
[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 49fc1f215a)
Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
This commit is contained in:
parent
79c86b118c
commit
84c6fe6ac6
1 changed files with 0 additions and 9 deletions
|
|
@ -684,8 +684,6 @@ search_linux_map_for_section(proc_handle_t *handle, const char* secname, const c
|
||||||
}
|
}
|
||||||
|
|
||||||
uintptr_t retval = 0;
|
uintptr_t retval = 0;
|
||||||
int lines_processed = 0;
|
|
||||||
int matches_found = 0;
|
|
||||||
|
|
||||||
while (fgets(line + linelen, linesz - linelen, maps_file) != NULL) {
|
while (fgets(line + linelen, linesz - linelen, maps_file) != NULL) {
|
||||||
linelen = strlen(line);
|
linelen = strlen(line);
|
||||||
|
|
@ -710,7 +708,6 @@ search_linux_map_for_section(proc_handle_t *handle, const char* secname, const c
|
||||||
line[linelen - 1] = '\0';
|
line[linelen - 1] = '\0';
|
||||||
// and prepare to read the next line into the start of the buffer.
|
// and prepare to read the next line into the start of the buffer.
|
||||||
linelen = 0;
|
linelen = 0;
|
||||||
lines_processed++;
|
|
||||||
|
|
||||||
unsigned long start = 0;
|
unsigned long start = 0;
|
||||||
unsigned long path_pos = 0;
|
unsigned long path_pos = 0;
|
||||||
|
|
@ -731,7 +728,6 @@ search_linux_map_for_section(proc_handle_t *handle, const char* secname, const c
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strstr(filename, substr)) {
|
if (strstr(filename, substr)) {
|
||||||
matches_found++;
|
|
||||||
retval = search_elf_file_for_section(handle, secname, start, path);
|
retval = search_elf_file_for_section(handle, secname, start, path);
|
||||||
if (retval) {
|
if (retval) {
|
||||||
break;
|
break;
|
||||||
|
|
@ -850,15 +846,10 @@ search_windows_map_for_section(proc_handle_t* handle, const char* secname, const
|
||||||
MODULEENTRY32W moduleEntry;
|
MODULEENTRY32W moduleEntry;
|
||||||
moduleEntry.dwSize = sizeof(moduleEntry);
|
moduleEntry.dwSize = sizeof(moduleEntry);
|
||||||
void* runtime_addr = NULL;
|
void* runtime_addr = NULL;
|
||||||
int modules_examined = 0;
|
|
||||||
int matches_found = 0;
|
|
||||||
|
|
||||||
for (BOOL hasModule = Module32FirstW(hProcSnap, &moduleEntry); hasModule; hasModule = Module32NextW(hProcSnap, &moduleEntry)) {
|
for (BOOL hasModule = Module32FirstW(hProcSnap, &moduleEntry); hasModule; hasModule = Module32NextW(hProcSnap, &moduleEntry)) {
|
||||||
modules_examined++;
|
|
||||||
|
|
||||||
// Look for either python executable or DLL
|
// Look for either python executable or DLL
|
||||||
if (wcsstr(moduleEntry.szModule, substr)) {
|
if (wcsstr(moduleEntry.szModule, substr)) {
|
||||||
matches_found++;
|
|
||||||
runtime_addr = analyze_pe(moduleEntry.szExePath, moduleEntry.modBaseAddr, secname);
|
runtime_addr = analyze_pe(moduleEntry.szExePath, moduleEntry.modBaseAddr, secname);
|
||||||
if (runtime_addr != NULL) {
|
if (runtime_addr != NULL) {
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue