From: Tim Duesterhus Date: Wed, 12 Jun 2019 18:47:30 +0000 (+0200) Subject: BUILD: Silence gcc warning about unused return value X-Git-Tag: v2.0.0~53 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dda1155ed7a295889ed1e1741a60851d74a49d04;p=thirdparty%2Fhaproxy.git BUILD: Silence gcc warning about unused return value gcc (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. complains: > src/debug.c: In function "ha_panic": > src/debug.c:162:2: warning: ignoring return value of "write", declared with attribute warn_unused_result [-Wunused-result] > (void) write(2, trash.area, trash.data); > ^ --- diff --git a/src/debug.c b/src/debug.c index fd760faace..059bc6b975 100644 --- a/src/debug.c +++ b/src/debug.c @@ -159,7 +159,7 @@ void ha_panic() chunk_reset(&trash); chunk_appendf(&trash, "Thread %u is about to kill the process.\n", tid + 1); ha_thread_dump_all_to_trash(); - write(2, trash.area, trash.data); + shut_your_big_mouth_gcc(write(2, trash.area, trash.data)); for (;;) abort(); }