From: | Jeff Davis <pgsql(at)j-davis(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | simplehash.h: "SH_SCOPE static" causes warnings |
Date: | 2024-04-09 18:10:15 |
Message-ID: | 3b3cc3f7ff24b5d35c2a8a41c3a90f46aee07710.camel@j-davis.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
If using "SH_SCOPE static" with simplehash.h, it causes a bunch of
warnings about functions that are defined but not used. It's simple
enough to fix by appending pg_attribute_unused() to the declarations
(attached).
There are currently no callers that use "SH_SCOPE static", but I'm
suggesting its use in the thread below as a cleanup to a recently-
committed feature:
https://www.postgresql.org/message-id/791d98f474e518387d09eb390b8a12f265d130cc.camel@j-davis.com
The reason I'm suggesting it there is because the hash table is used
only for the indexed binary heap, not an ordinary binary heap, so I'd
like to leave it up to the compiler whether to do any inlining or not.
If someone thinks the attached patch is a good change to commit now,
please let me know. Otherwise, I'll recommend "static inline" in the
above thread and leave the attached patch to be considered for v18.
Regards,
Jeff Davis
Attachment | Content-Type | Size |
---|---|---|
v1-0001-simplehash.h-declare-with-pg_attribute_unused.patch | text/x-patch | 4.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Alexander Korotkov | 2024-04-09 18:32:16 | Re: removal of '{' from WORD_BREAKS |
Previous Message | Jeff Davis | 2024-04-09 18:04:49 | Re: Improve eviction algorithm in ReorderBuffer |