Treat unused function result as an error for gcc and clang...

... and handle them accordingly.