mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-05 13:03:34 +00:00
MINOR: debug: consume the write() result in BUG_ON() to silence a warning
Tim reported that BUG_ON() issues warnings on his distro, as the libc marks some syscalls with __attribute__((warn_unused_result)). Let's pass the write() result through DISGUISE() to hide it.
This commit is contained in:
parent
f401668306
commit
15ed69fd3f
@ -59,7 +59,7 @@
|
||||
do { \
|
||||
if (unlikely(cond)) { \
|
||||
const char msg[] = "\nFATAL: bug condition \"" #cond "\" matched at " file ":" #line "\n"; \
|
||||
(void)write(2, msg, strlen(msg)); \
|
||||
DISGUISE(write(2, msg, strlen(msg))); \
|
||||
CRASH_NOW(); \
|
||||
} \
|
||||
} while (0)
|
||||
|
Loading…
Reference in New Issue
Block a user