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

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Paint some PG_USED_FOR_ASSERTS_ONLY in inline functions of ilist.h and bufpage.h
Date: 2021-01-19 01:52:46
Message-ID: YAY7boLRgOlkFZgi@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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, and one example of that is
plpgsql_check. We don't have examples on HEAD where
PG_USED_FOR_ASSERTS_ONLY is used on arguments, but that looks to work
properly with gcc.

Thoughts?
--
Michael

Attachment Content-Type Size
ilist-page-asserts.patch text/x-diff 2.0 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message tsunakawa.takay@fujitsu.com 2021-01-19 01:56:50 RE: POC: postgres_fdw insert batching
Previous Message tsunakawa.takay@fujitsu.com 2021-01-19 01:28:44 RE: POC: postgres_fdw insert batching