Careful with that example. The parentheses here don't just remove the warning. They remove a bug. This code:
if (buf = malloc(buflen) == NULL)
goto outofmemory;
is actually equivalent to that code:
if (buf = (malloc(buflen) == NULL))
goto outofmemory;
So, malloc gives you a pointer, which is compared to the null pointer, giving you either 0 or 1. And that is assigned to buf. Hopefully your compiler will warn you about the type error that spawns from such dark magic.