[MASSMAIL]simplehash.h: "SH_SCOPE static" causes warnings - Mailing list pgsql-hackers

From Jeff Davis
Subject [MASSMAIL]simplehash.h: "SH_SCOPE static" causes warnings
Date
Msg-id 3b3cc3f7ff24b5d35c2a8a41c3a90f46aee07710.camel@j-davis.com
Whole thread Raw
Responses Re: simplehash.h: "SH_SCOPE static" causes warnings
Re: simplehash.h: "SH_SCOPE static" causes warnings
List 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

pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: Improve eviction algorithm in ReorderBuffer
Next
From: Alexander Korotkov
Date:
Subject: Re: removal of '{' from WORD_BREAKS