[PATCH] Cygwin: cygcheck: fix a new warning with gcc 16
Jon Turney <[email protected]> Tue, 2 Jun 2026 12:20:07 +0100
| Newsgroups | gmane.os.cygwin.patches |
|---|---|
| Message-ID | <[email protected]> |
The mingW-targetted gcc available in Fedora is now gcc 16. > ../../../../../winsup/utils/mingw/cygcheck.cc: In function 'void dump_sysinfo()': > ../../../../../winsup/utils/mingw/cygcheck.cc:1716:11: error: variable 'count_path_items' set but not used [-Werror=unused-but-set-variable=] As far as I can tell, the value of count_path_items we compute has never been used. Signed-off-by: Jon Turney <[email protected]> --- 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 = strchr (s, ';') ? ';' : ':'; - int count_path_items = 0; while (1) { for (e = s; *e && *e != 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 = e + 1; -- 2.51.0