From: Mark W. <ma...@so...> - 2025-10-17 23:36:18
|
https://sourceware.org/cgit/valgrind/commit/?id=b74d16c9b0db657ea321b72dc17d0c06022a7f71 commit b74d16c9b0db657ea321b72dc17d0c06022a7f71 Author: Mark Wielaard <ma...@kl...> Date: Sat Oct 18 01:27:57 2025 +0200 coregrind/m_debuginfo/readpdb.c (DEBUG_SnarfLinetab): Remove this_seg GCC notices that this_seg is set, but never really used in this function m_debuginfo/readpdb.c: In function 'DEBUG_SnarfLinetab': m_debuginfo/readpdb.c:1542:23: warning: variable 'this_seg' set but not used [-Wunused-but-set-variable=] 1542 | Int this_seg; | ^~~~~~~~ Fix this by just removing this_seg. Diff: --- coregrind/m_debuginfo/readpdb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/coregrind/m_debuginfo/readpdb.c b/coregrind/m_debuginfo/readpdb.c index dbae197b32..9e29fefb15 100644 --- a/coregrind/m_debuginfo/readpdb.c +++ b/coregrind/m_debuginfo/readpdb.c @@ -1539,7 +1539,6 @@ static ULong DEBUG_SnarfLinetab( union any_size pnt; union any_size pnt2; const struct startend * start; - Int this_seg; Bool debug = di->trace_symtab; ULong n_lines_read = 0; @@ -1563,7 +1562,6 @@ static ULong DEBUG_SnarfLinetab( pnt2.c = (const HChar *)linetab + filetab[i]; } - this_seg = 0; for (i = 0; i < nfile; i++) { const HChar *fnmstr; const HChar *dirstr; @@ -1601,7 +1599,7 @@ static ULong DEBUG_SnarfLinetab( fnmstr = ML_(addStr)(di, fnmstr, k); fnmdirstr_ix = ML_(addFnDn) (di, fnmstr, dirstr); - for (k = 0; k < file_segcount; k++, this_seg++) { + for (k = 0; k < file_segcount; k++) { Int linecount; Int segno; |