Closed picca closed 3 years ago
Hello, I match a constructor but, I do not need all the parameters
match(detector){ of(Detector, _, shape, _){ *width = shape->width; *height = shape->height; } }
So when Compiling, I have a lot's of
hkl-binoculars-detectors-2d.c:440:17: warning: unused variable ‘_’ [-Wunused-variable] 440 | of(Detector, _, shape){ |
So is there a better solution than switching off the unused-variable in order to silent this message. Maybe a dedicated _ variable with an unused annotation ?
Cheers
Fred
Hmm, actually a reserved variable name _ seems to be a good solution. I've just implemented it -- you can pull the latest changes and use it.
_
It works great,
thanks
Hello, I match a constructor but, I do not need all the parameters
So when Compiling, I have a lot's of
So is there a better solution than switching off the unused-variable in order to silent this message. Maybe a dedicated _ variable with an unused annotation ?
Cheers
Fred