[pgpool-hackers: 4280] Re: Proper declaration for SplitIdentifierString
Florian Weimer
fweimer at redhat.com
Sun Feb 5 19:02:08 JST 2023
* Tatsuo Ishii:
> Hi,
>
>> Currently, SplitIdentifierString is resolved via an implicit function
>> declaration. This results in a compiler warning (also visible on the
>> buildbots):
>>
>> pgpool-regclass.c: In function 'MystringToQualifiedNameList':
>> pgpool-regclass.c:123:7: warning: implicit declaration of function 'SplitIdentifierString' [-Wimplicit-function-declaration]
>> if (!SplitIdentifierString(rawname, '.', &namelist))
>> ^~~~~~~~~~~~~~~~~~~~~
>>
>> Future compilers (e.g., Clang 16, and GCC more long term, perhaps the 14
>> release in 2024) are likely not to accept implicit function declarations
>> by default, so it would be nice to address that now.
>
> Totally agreed.
>
>> I tried to include src/include/utils/pool_relcache.h in
>> pgpool-regclass.c, but that result in compile errors because the header
>> interdependencies do not seem to work out:
>
> I think what we need is, including "utils/varlena.h" (one of
> PostgreSQL header files).
I see you fixed it.
commit 3dce610eca07759b05fd1dd39decd77e235cac13
Author: Tatsuo Ishii <ishii at sraoss.co.jp>
Date: Sat Dec 24 12:41:01 2022 +0900
Fix compiler warning.
pgpool-regclass.c needed to include "utils/varlena.h". Also sort out
the header files order (except postgres.h which needs to be appear at
the top among PostgreSQL header files).
The compiler warning was reported by Florian Weimer.
https://www.pgpool.net/pipermail/pgpool-hackers/2022-December/004241.html
Using our instrumented compiler, I can confirm this addresses all such
issues.
Many thanks!
Florian
More information about the pgpool-hackers
mailing list