aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/xml.c
diff options
context:
space:
mode:
authorDavid Rowley <drowley@postgresql.org>2022-08-31 07:33:54 +1200
committerDavid Rowley <drowley@postgresql.org>2022-08-31 07:33:54 +1200
commit05f90842369538cf94bbd09970a008b9357f4101 (patch)
tree26a4f142f78e8f2a47b271205a8e22896fa19ec1 /src/backend/utils/adt/xml.c
parent5495796ad12aae971137d184ff25add8f6b03968 (diff)
downloadpostgresql-05f90842369538cf94bbd09970a008b9357f4101.tar.gz
postgresql-05f90842369538cf94bbd09970a008b9357f4101.zip
Various cleanups of the new memory context header code
Robert Haas reported that his older clang compiler didn't like the two Asserts which were verifying that the given MemoryContextMethodID was <= MEMORY_CONTEXT_METHODID_MASK when building with -Wtautological-constant-out-of-range-compare. In my (David's) opinion, the compiler is wrong to warn about that. Newer versions of clang don't warn about the out of range enum value, so perhaps this was a bug that has now been fixed. To keep older clang versions happy, let's just cast the enum value to int to stop the compiler complaining. The main reason for the Asserts mentioned above to exist are to inform future developers which are adding new MemoryContexts if they run out of bit space in MemoryChunk to store the MemoryContextMethodID. As pointed out by Tom Lane, it seems wise to also add a comment to the header for that enum to document the restriction on these enum values. Additionally, also fix an incorrect usage of UINT64CONST() which was introduced in c6e0fe1f2. Author: Robert Haas, David Rowley Discussion: https://postgr.es/m/CA+TgmoYGG2C7Vbw1cjkQRRBL3zOk8SmhrQnsJgzscX=N9AwPrw@mail.gmail.com
Diffstat (limited to 'src/backend/utils/adt/xml.c')
0 files changed, 0 insertions, 0 deletions