tech-misc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: __attribute__((warn_unused_result)) for NetBSD?



> Of couse declaring functions like abs(3) as "warn_unused_result" is
> useless.

Huh?  I don't think so; the ones where you are certain to want the
result (because there's no point in calling it otherwise) are the oens
where I think such a warning is reasonable.

What I do _not_ consider reasonable is using it for functions with
useful side effects, such as printf.  I see nothing inherently wrong
with ignoring return values, and I will not uglify my code with casts
to void to "fix" non-errors, even if that means turning off the
warnings in question entirely.

/~\ The ASCII                           der Mouse
\ / Ribbon Campaign
 X  Against HTML                mouse%rodents-montreal.org@localhost
/ \ Email!           7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index