Re: static assert cleanup

Peter Eisentraut <peter.eisentraut@enterprisedb.com>

From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Peter Smith <smithpb2250@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2022-12-14T15:15:14Z
Lists: pgsql-hackers
On 11.12.22 23:18, Peter Smith wrote:
> +StaticAssertDecl(SysCacheSize == (int) lengthof(cacheinfo),
> + "SysCacheSize does not match syscache.c's array");
> +
>   static CatCache *SysCache[SysCacheSize];
> 
> In almost every example I found of StaticAssertXXX, the lengthof(arr)
> part came first in the condition. Since you are modifying this anyway,
> should this one also be reversed for consistency?

Makes sense.  I have pushed this separately.



Commits

  1. Static assertions cleanup

  2. Rearrange some static assertions for consistency