Re: [PATCH] BUILD: Avoid warning about ignoring write()'s return value in BUG_ON()

2020-03-14 Thread Tim Düsterhus
Willy, Am 14.03.20 um 12:15 schrieb Willy Tarreau: > Good point we could indeed. Quite frankly it's a detail since this > really is developer-only code. Nobody wants to run with DEBUG_UAF by > accident, it's slow and uses a lot of memory :-) > As I had the code open anyway to make that CLEANUP t

Re: [PATCH] BUILD: Avoid warning about ignoring write()'s return value in BUG_ON()

2020-03-14 Thread Willy Tarreau
On Sat, Mar 14, 2020 at 11:56:13AM +0100, Tim Düsterhus wrote: > Willy, > > Am 14.03.20 um 11:14 schrieb Willy Tarreau: > > Now done. I've also cleaned up the null-derefw warning in the debugging > > code of the pools. > > > > Can't the pools simply use `ABORT_NOW()` instead of `*DISGUISE((volat

Re: [PATCH] BUILD: Avoid warning about ignoring write()'s return value in BUG_ON()

2020-03-14 Thread Tim Düsterhus
Willy, Am 14.03.20 um 11:14 schrieb Willy Tarreau: > Now done. I've also cleaned up the null-derefw warning in the debugging > code of the pools. > Can't the pools simply use `ABORT_NOW()` instead of `*DISGUISE((volatile int *)0) = 0;`? Best regards Tim Düsterhus

Re: [PATCH] BUILD: Avoid warning about ignoring write()'s return value in BUG_ON()

2020-03-14 Thread Willy Tarreau
On Fri, Mar 13, 2020 at 07:07:54PM +0100, Willy Tarreau wrote: > On Fri, Mar 13, 2020 at 05:41:14PM +0100, Tim Düsterhus wrote: > > Willy, > > > > Am 13.03.20 um 17:34 schrieb Willy Tarreau: > > > Indeed, just found it in my queue. However we usually use it > > > differently, with the function ins

Re: [PATCH] BUILD: Avoid warning about ignoring write()'s return value in BUG_ON()

2020-03-13 Thread Willy Tarreau
On Fri, Mar 13, 2020 at 05:41:14PM +0100, Tim Düsterhus wrote: > Willy, > > Am 13.03.20 um 17:34 schrieb Willy Tarreau: > > Indeed, just found it in my queue. However we usually use it > > differently, with the function instead of the variable. Do you > > mind if I adapt it ? > > > > I attempted

Re: [PATCH] BUILD: Avoid warning about ignoring write()'s return value in BUG_ON()

2020-03-13 Thread Tim Düsterhus
Willy, Am 13.03.20 um 17:34 schrieb Willy Tarreau: > Indeed, just found it in my queue. However we usually use it > differently, with the function instead of the variable. Do you > mind if I adapt it ? > I attempted to use the function, but it didn't compile. I guess because of a circular depend

Re: [PATCH] BUILD: Avoid warning about ignoring write()'s return value in BUG_ON()

2020-03-13 Thread Willy Tarreau
On Fri, Mar 13, 2020 at 12:23:26PM +0100, Tim Düsterhus wrote: > Willy, > > Am 09.03.20 um 17:05 schrieb Tim Duesterhus: > > gcc complains (non-rightfully): > > > >> include/common/buf.h: In function 'br_head_pick': > >> include/common/debug.h:62:4: warning: ignoring return value of 'write', > >

Re: [PATCH] BUILD: Avoid warning about ignoring write()'s return value in BUG_ON()

2020-03-13 Thread Tim Düsterhus
Willy, Am 09.03.20 um 17:05 schrieb Tim Duesterhus: > gcc complains (non-rightfully): > >> include/common/buf.h: In function ‘br_head_pick’: >> include/common/debug.h:62:4: warning: ignoring return value of ‘write’, >> declared with attribute warn_unused_result [-Wunused-result] >> (void)wri