At Thu, 8 Aug 2019 22:56:02 +0300, Mark G <markg735@gmail.com> wrote in
<CAEeOP_Y3SAXe8u++9e-CN_+MgY9_u+vu3a80sw+7gzR4s7KjqQ@mail.gmail.com>
> On Thu, Aug 8, 2019 at 8:51 PM Peter Eisentraut <
> peter.eisentraut@2ndquadrant.com> 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