Compound literals are lvalues. This means it's possible to take their
address. That is, it would be possible (albeit nonsensical) to do
&strerrno();
It is also possible to assign to them (albeit also nonsensical):
strerrno() = NULL;
The statement expression performs lvalue conversion, which turns the
lvalue into an "rvalue", as expected, and disallows all those issues.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
// strerrno - string errno
-#define strerrno() ((const char *){strerror(errno)})
+#define strerrno() ({(const char *){strerror(errno)};})
#endif // include guard