Re: [PATCH] BUILD: Silence gcc warning about unused return value

2019-06-13 Thread Willy Tarreau
Hi guys, On Wed, Jun 12, 2019 at 10:31:37PM +0200, Vincent Bernat wrote: > ? 12 juin 2019 20:47 +02, Tim Duesterhus : > > > - write(2, trash.area, trash.data); > > + shut_your_big_mouth_gcc(write(2, trash.area, trash.data)); Now merged, thanks Tim! > An alternative not discussed in 89efaed

Re: [PATCH] BUILD: Silence gcc warning about unused return value

2019-06-12 Thread Vincent Bernat
❦ 12 juin 2019 20:47 +02, Tim Duesterhus : > - write(2, trash.area, trash.data); > + shut_your_big_mouth_gcc(write(2, trash.area, trash.data)); An alternative not discussed in 89efaed6b67b (which introduced this function) is to use "(void)!": (void)!write(2, trash.area, trash.data); F

[PATCH] BUILD: Silence gcc warning about unused return value

2019-06-12 Thread Tim Duesterhus
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_pa