On 03/17/16 20:51, Laszlo Ersek wrote: > (adding Ard and Shumin because the below will tie in with another thread) > > On 03/17/16 19:05, Leif Lindholm wrote: > >> I must confess to no small amount of surprise that optionally adding >> the ability to tag an unused argument as unused is controversial.
> If I understand correctly, if we wanted to enable "-Wunused-parameter > -Wunused-but-set-parameter" even just occasionally, these ~4000 > instances would have to be audited, and each should be either fixed > (i.e., internal functions should drop the parameters) or marked UNUSED > (i.e., library instances and PPI/protocol implementations should > annotate their definitions of public functions). > > Thus, this is what surprises me. It looks daunting. Small clarification: if you'd like to selectively add "-Wunused-parameter -Wunused-but-set-parameter" to the [BuildOptions] of a number of (non-core?) modules (in their INF files), and employ UNUSED in connection with that, I certainly think that's a valid use case. To me it does justify this patch. Namely, perhaps marking parameters as UNUSED will not be enforced across the entire tree, but if a module owner would like to enable those warnings on his/her turf, then he/she should be able to annotate the unused parameters with a macro that is centrally defined. The macro definition should be universal, even though its application might not be. Thanks Laszlo _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

