On Tue, Apr 9, 2024 at 2:10 PM Jeff Davis <pgsql(at)j-davis(dot)com> wrote:
> 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).
Hmm. I'm pretty sure that I've run into this problem, but I concluded
that I should use either "static inline" or "extern" and didn't think
any more of it. I'm not sure that I like the idea of just ignoring the
warnings, for fear that the compiler might not actually remove the
code for the unused functions from the resulting binary. But I'm not
an expert in this area either, so maybe I'm wrong.
--
Robert Haas
EDB: http://www.enterprisedb.com