[newlib-cygwin/main] Cygwin: cygcheck: fix a new warning with gcc 16
Jon Turney via Cygwin-cvs <[email protected]> Fri, 5 Jun 2026 11:52:50 +0000 (GMT)
| Newsgroups | gmane.os.cygwin.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D54692d3ad6c= 0b0b360e13c47f23046788676554c commit 54692d3ad6c0b0b360e13c47f23046788676554c Author: Jon Turney <[email protected]> Date: Mon Jun 1 14:48:11 2026 +0100 Cygwin: cygcheck: fix a new warning with gcc 16 =20 The mingW-targetted gcc available in Fedora is now gcc 16. =20 > ../../../../../winsup/utils/mingw/cygcheck.cc: In function 'void dump= _sysinfo()': > ../../../../../winsup/utils/mingw/cygcheck.cc:1716:11: error: variabl= e 'count_path_items' set but not used [-Werror=3Dunused-but-set-variable=3D] =20 As far as I can tell, the value of count_path_items we compute has never been used. =20 Signed-off-by: Jon Turney <[email protected]> Diff: --- winsup/utils/mingw/cygcheck.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/winsup/utils/mingw/cygcheck.cc b/winsup/utils/mingw/cygcheck.cc index d17909bfc..e6374d712 100644 --- a/winsup/utils/mingw/cygcheck.cc +++ b/winsup/utils/mingw/cygcheck.cc @@ -1713,7 +1713,6 @@ dump_sysinfo () else { char sep =3D strchr (s, ';') ? ';' : ':'; - int count_path_items =3D 0; while (1) { for (e =3D s; *e && *e !=3D sep; e++); @@ -1721,7 +1720,6 @@ dump_sysinfo () printf ("\t%.*s\n", (int) (e - s), s); else puts ("\t."); - count_path_items++; if (!*e) break; s =3D e + 1;