❦ 12 juin 2019 20:47 +02, Tim Duesterhus <t...@bastelstu.be>:

> -     write(2, trash.area, trash.data);
> +     shut_your_big_mouth_gcc(write(2, trash.area, trash.data));

An alternative not discussed in 89efaed6b67b (which introduced this
function) is to use "(void)!":

 (void)!write(2, trash.area, trash.data);

For an entertaining discussion, see:

 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425

Of course, like the "if (foo()) /* do nothing */;", this can be broken
in the future.
-- 
Use library functions.
            - The Elements of Programming Style (Kernighan & Plauger)

Reply via email to