These are already fixed upstream in binutils, but the rawhide gdb appears to not have been updated to incorporate those. Reproducible: Always Steps to Reproduce: Scratch build against the f44-build-side-124978 side tag to reproduce Actual Results: ../../bfd/archive.c: In function ‘_bfd_compute_and_write_armap’: ../../bfd/archive.c:2307:12: error: variable ‘elt_no’ set but not used [-Werror=unused-but-set-variable=] 2307 | file_ptr elt_no = 0; | ^~~~~~ cc1: all warnings being treated as errors ... ../../bfd/bfd.c: In function ‘_bfd_doprnt’: ../../bfd/bfd.c:1062:23: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 1062 | char *end = strchr (ptr, '%'); | ^~~~~~ cc1: all warnings being treated as errors
I will take care of this while doing the GDB 17.1 rebase. It seems that the change removing elt_no from bfd/archive.c is already in the GDB 17.1 sources. However, the fix for the const problem is not. So that change will have to be applied separately.
These problems plus several more have been fixed in the GDB 17.1 rebase plus backports for rawhide. I'm closing this issue.