]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Change remaining StaticAssertStmt() to StaticAssertDecl()
authorPeter Eisentraut <peter@eisentraut.org>
Mon, 16 Feb 2026 08:13:10 +0000 (09:13 +0100)
committerPeter Eisentraut <peter@eisentraut.org>
Mon, 16 Feb 2026 08:22:43 +0000 (09:22 +0100)
commitd50c86e743755e7ea91e5980f09f8575e0cb338b
treebdbc815d9036a4dc6dde0f56820a52e71e85625e
parent351265a6c7fd15737e4b68cada778728fc325a8b
Change remaining StaticAssertStmt() to StaticAssertDecl()

This completes the work started by commit 75f49221c22.

In basebackup.c, changing the StaticAssertStmt to StaticAssertDecl
results in having the same StaticAssertDecl() in 2 functions.  So, it
makes more sense to move it to file scope instead.

Also, as it depends on some computations based on 2 tar blocks, define
TAR_NUM_TERMINATION_BLOCKS.

In deadlock.c, change the StaticAssertStmt to StaticAssertDecl and
keep it in the function scope.  Add new braces to avoid warning from
-Wdeclaration-after-statement.

In aset.c, change the StaticAssertStmt to StaticAssertDecl and move it
to file scope.

Finally, update the comments in c.h a bit.

Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Co-authored-by: Peter Eisentraut <peter@eisentraut.org>
Discussion: https://www.postgresql.org/message-id/aYH6ii46AvGVCB84%40ip-10-97-1-34.eu-west-3.compute.internal
src/backend/backup/basebackup.c
src/backend/storage/lmgr/deadlock.c
src/backend/utils/mmgr/aset.c
src/include/c.h