https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425
--- Comment #72 from Segher Boessenkool <segher at gcc dot gnu.org> --- The correct way to not get the warning about unused results, is to _do_ use the function return value, of course, as I explained in #c18 already. Like: if (foo()) { /* The return value of foo can be ignored here because X and Y. */ } You *always* should explain why you can ignore it here (not just *that* you can, that's not an explanation, that's merely a statement), anyway, so this gives a nicely readable flow.