On 03.02.26 14:39, Bertrand Drouvot wrote:
Yeah, I gave it a try and I did not choose the same place for all the files.

1/ basebackup.c

Since changing the remaining StaticAssertStmt to StaticAssertDecl introduces
a duplicate, I thought it would make sense to:

- remove the StaticAssertStmt
- move the existing StaticAssertDecl at file scope

As it depends of the literal "2" also used in some computation then I introduced
TAR_TERMINATION_BLOCKS and used it in the StaticAssertDecl and the functions.

2/ deadlock.c

It makes sense to keep it near the related code, so:

- changed to StaticAssertDecl
- Added new braces to avoid Wdeclaration-after-statement to trigger

3/ aset.c

Changes the StaticAssertStmt to StaticAssertDecl and move it to file scope (that
looks more appropriate).

Attached 3 patches to ease the review.

After there are no remaining usages of StaticAssertStmt() and we may want to
deprecate it.

I have committed this.

I changed TAR_TERMINATION_BLOCKS to TAR_NUM_TERMINATION_BLOCKS for a little bit more clarity. And then I added a comment in c.h that StaticAssertStmt() is deprecated.



Reply via email to