basic/{time,format}-util: warn when format result is unused

Now that anonymous buffers are used in almost all cases, code which
does not use the return value is usually broken.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2021-07-09 11:11:25 +02:00
parent bc2a4af25f
commit 6c6368e938
3 changed files with 7 additions and 4 deletions
+1
View File
@@ -30,6 +30,7 @@
#define _weakref_(x) __attribute__((__weakref__(#x)))
#define _alignas_(x) __attribute__((__aligned__(__alignof(x))))
#define _alignptr_ __attribute__((__aligned__(sizeof(void*))))
#define _warn_unused_result_ __attribute__((__warn_unused_result__))
#if __GNUC__ >= 7
#define _fallthrough_ __attribute__((__fallthrough__))
#else