On Wed, Mar 20 2019, Jeff King wrote: > Here's another round of -Wunused-parameter cleanups. Previous rounds > were at [1] and [2]. As before, these are mostly just removals, so it's > easy to see there's no behavior change (there are a couple of cleanups > that ride along, though, so watch for those). > > There are two minor conflicts when merging with pu: > > - jt/fetch-cdn-offload tweaked the "pack_lockfile" parameter to > fetch_pack(). A few other parameters are dropped in this series. > The textual resolution is pretty straightforward. > > - ps/stash-in-c (et al) added a new call to report_path_error() in > builtin/stash.c, which here loses its redundant "prefix" parameter. > There's no textual conflict, but the new call needs to drop its > final NULL parameter in order to compile. LGTM from skimming it, FWIW this is now what we need to compile cleanly with -Wextra: make DEVELOPER=1 DEVOPTS="extra-all" CFLAGS="-Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-empty-body" all For some such as -Wempty-body we'd really need to contort ourselves to get it passing anywhere near cleanly (all of those have existing "/* this is intentional! */" comments). I wonder if for the rest of these it's worth re-picking up this old suggestions of yours about #pragma: https://public-inbox.org/git/20170126143252.ne533mcv3n2ksbai@xxxxxxxxxxxxxxxxxxxxx/ I.e. for us to define our own macro for these cases & use it. https://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html https://clang.llvm.org/docs/UsersManual.html#controlling-diagnostics-via-pragmas I was looking into this for SunCC the other day, it has various new warnings that are useful that neither gcc nor clang (or anything else I've tried) has, but also has some stupidities due to faulty code analysis, luckily those can be disabled: https://docs.oracle.com/cd/E19205-01/819-5265/bjaby/index.html This would allow me to compile there with -Werror. It would mean quite some macro verbosity in some existing code, maybe it's not worth it...