Follow-up Comment #5, bug #43569 (project groff): > However, the warning > version.cpp:3:24: warning: `Version_string' initialized > and declared `extern' [enabled by default] > SHOULD be fixed, as it is a syntactical error. > The line is generates in > groff-1.22.3/src/libs/libgroff/Makefile.sub
You are essentially reverting the libgroff/Makefile.sub part of: http://git.savannah.gnu.org/cgit/groff.git/commit/?id=b1b253a4e1fe8ae3c2071c88b5d1e19ef6eb8968 Maybe that's ok (I'm not sure). > Question: what is the correct way to suppress a warning > if a return value is really not needed? That can't be answered in one word. Not every compiler warning can be suppressed in any reasoable way, some compilers are just excessively chatty. In some cases - only for functions like snprintf() where ignoring the return value is usually a severe error - it may be appropriate to cast to (void) if a thorough audit reveals that ignoring the return value is OK in the (exceptional) case at hand, usually together with a comment explaining *why* it is ok, for the next auditor. For functions like close() where it is usually no problem to ignore the return value, nothing should be done, not even a cast; doing anything would merely be a distraction from the clarity of the code. _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?43569> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ _______________________________________________ bug-groff mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-groff
