[Chapel Merge] Fix GCC 16 compiler errors with CHPL_DEVELOPER=1

Branch: refs/heads/main
Revision: 08af864abe0d002f89255f971735888608150733
Author: jabraham17
Link: Fix GCC 16 compiler errors with CHPL_DEVELOPER=1 by jabraham17 · Pull Request #28771 · chapel-lang/chapel · GitHub
Log Message:
Fix GCC 16 compiler errors with CHPL_DEVELOPER=1 (#28771)

Fixes GCC 16 compiler errors that occur in developer mode (with
-Werror).

The GASNet team using GCC 16 observed errors from unused variables,
namely in hwloc and GASNet. Rather than worry about patching third-party
code, this PR just turns the errors into warnings

Thanks to @PHHargrove for finding the issue and verifying the fix

[Reviewed by @arifthpe]

Compare: Comparing ed33d7db8f4a3fe4f19d6f0b320acf4e21d04f3c...4f57bdd37706b9285ed9f94a32a4ac5ef0d6b42f · chapel-lang/chapel · GitHub

Diff:
M make/compiler/Makefile.gnu
https://github.com/chapel-lang/chapel/pull/28771.diff