At Thu, 8 Aug 2019 22:56:02 +0300, Mark G <[email protected]> wrote in
<caeeop_y3saxe8u++9e-cn_+mgy9_u+vu3a80sw+7gzr4s7k...@mail.gmail.com>
> On Thu, Aug 8, 2019 at 8:51 PM Peter Eisentraut <
> [email protected]> wrote:
>
>
> > How did you find this? Any special compiler settings?
> >
>
> 16 hours stuck in a plane on an international flight. I was just eyeballing
> the code to kill the boredom.
A similar loose typing is seen, for example:p
-const char *
+const char * const
src/backend/access/rmgrdesc/*.c
relmap_identify(uint8 info)
seq_identify(uint8 info)
smgr_identify(uint8 info)
.... (many)...
src/backend/access/transam/xact.c:
BlockStateAsString(TBlockState blockState)
I foundnd them by
find $(TOP) -type f -exec egrep -nH -e '^(static )?const char \*' {} +
then eyeballing on the first ones. I don't know an automated way
to detect such possibly-loose constness of variables or
functions.
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center