From: Mark Wielaard Date: Fri, 17 Oct 2025 23:27:57 +0000 (+0200) Subject: coregrind/m_debuginfo/readpdb.c (DEBUG_SnarfLinetab): Remove this_seg X-Git-Tag: VALGRIND_3_26_0~17 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b74d16c9b0db657ea321b72dc17d0c06022a7f71;p=thirdparty%2Fvalgrind.git 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 --git a/coregrind/m_debuginfo/readpdb.c b/coregrind/m_debuginfo/readpdb.c index dbae197b3..9e29fefb1 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;