Re:Everybody makes mistakes when writing comparison functions
by commandlinefan on Thursday September 09, 2021 @12:22PM
(#28471412)
> especially when using function-pointer-based APIs like qsort
Well, the function should be called somewhere, even if it's ignored when null. I can't think of a legitimate case for an unused parameter - it might be #ifdef-ed out in some cases, but it should still be referenced somewhere.
Well, the function should be called somewhere, even if it's ignored when null. I can't think of a legitimate case for an unused parameter - it might be #ifdef-ed out in some cases, but it should still be referenced somewhere.