Pádraig Brady <[email protected]> writes: > On 19/11/2025 03:07, Collin Funk wrote: >> I'd rather use MAYBE_UNUSED to avoid the warnings for unused arguments, >> or ignore_value only if needed. >> -- 8< -- >> * src/cksum_crc.c (crc32b_sum_stream): Don't void cast a function. >> * src/copy.c (clone_file, set_author, copy_internal): Use MAYBE_UNUSED >> in the prototype instead of void casting the arguments. >> --- > > Fair enough on the parameters, > but can we leave the (void) fn() calls. > I find it natural, concise, descriptive to cast functions to (void) > where we don't need the return value in that context. > I agree ignore_value() should only be used if needed > as it's not concise.
Sure that is fine with me. I figured it was okay since there was only two occurrences. I mostly disliked the casting away -Wunused-parameter. I pushed the patch with the function casts left untouched [1]. Collin [1] https://gitweb.git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commit;h=55a32194a967c121aa24ce45941fdf6f9f149cc1
