Re: Paint some PG_USED_FOR_ASSERTS_ONLY in inline functions of ilist.h and bufpage.h

2021-01-19 Thread Michael Paquier
On Tue, Jan 19, 2021 at 04:27:43PM +0800, Julien Rouhaud wrote: > Yeah I don't see any explicit mention on that on gcc manual. For the > record it also work as expected using clang, and the attached patch > remove all warnings when compiling plpgsql_check. FWIW, the part of the GCC docs that I lo

Re: Paint some PG_USED_FOR_ASSERTS_ONLY in inline functions of ilist.h and bufpage.h

2021-01-19 Thread Julien Rouhaud
On Tue, Jan 19, 2021 at 9:53 AM Michael Paquier wrote: > > Hi all, > > The following functions in ilist.h and bufpage.h use some arguments > only in assertions: > - dlist_next_node > - dlist_prev_node > - slist_has_next > - slist_next_node > - PageValidateSpecialPointer > > Without PG_USED_FOR_ASS

Paint some PG_USED_FOR_ASSERTS_ONLY in inline functions of ilist.h and bufpage.h

2021-01-18 Thread Michael Paquier
Hi all, The following functions in ilist.h and bufpage.h use some arguments only in assertions: - dlist_next_node - dlist_prev_node - slist_has_next - slist_next_node - PageValidateSpecialPointer Without PG_USED_FOR_ASSERTS_ONLY, this can lead to compilation warnings when not using assertions, an