diff options
| author | Tom Lane | 2021-12-13 00:12:00 +0000 |
|---|---|---|
| committer | Tom Lane | 2021-12-13 00:12:00 +0000 |
| commit | bbbf22cf3351f0bc738cf9389b910e77dc653aba (patch) | |
| tree | cb43559f30d9e00cbe18055e7765ca0eed08868b /contrib/pgcrypto/imath.c | |
| parent | d393831eeaea06c0929e8df2677e134bb0ba0f5c (diff) | |
Reformat imath.c macro to remove -Wmisleading-indentation warnings.
Recent versions of gcc whine about the admittedly-completely-illegible
formatting of this macro. We've not noticed for a few reasons:
* In v12 and up, the problem is gone thanks to 48e24ba6b.
(Back-patching that doesn't seem prudent, though, so this patch
just manually improves the macro's formatting.)
* Buildfarm animals that might have complained, such as caiman,
do not because they use --with-openssl and so don't build imath.c.
* In a manual run such as "make all check-world", you won't see the
warning because it gets buried in an install.log file. You have to
do "make -C contrib all" or the like to see it.
I noticed this because in older branches, the last bit doesn't
happen so "check-world" actually does spew the warnings to stderr.
Maybe we should rethink how that works, because the newer behavior
is not an improvement IMO.
Back-patch down to 9.2, pursuant to newly-established project policy
about keeping out-of-support branches buildable.
Discussion: https://postgr.es/m/d0316012-ece7-7b7e-2d36-9c38cb77cb3b@enterprisedb.com
Diffstat (limited to 'contrib/pgcrypto/imath.c')
| -rw-r--r-- | contrib/pgcrypto/imath.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/contrib/pgcrypto/imath.c b/contrib/pgcrypto/imath.c index b94a51b81a4..413540099f2 100644 --- a/contrib/pgcrypto/imath.c +++ b/contrib/pgcrypto/imath.c @@ -129,8 +129,13 @@ do{T *u_=(A),*v_=u_+(N)-1;while(u_<v_){T xch=*u_;*u_++=*v_;*v_--=xch;}}while(0) #define CLAMP(Z) s_clamp(Z) #else #define CLAMP(Z) \ -do{mp_int z_=(Z);mp_size uz_=MP_USED(z_);mp_digit *dz_=MP_DIGITS(z_)+uz_-1;\ -while(uz_ > 1 && (*dz_-- == 0)) --uz_;MP_USED(z_)=uz_;}while(0) +do{ \ + mp_int z_=(Z); \ + mp_size uz_=MP_USED(z_); \ + mp_digit *dz_=MP_DIGITS(z_)+uz_-1; \ + while(uz_ > 1 && (*dz_-- == 0)) --uz_; \ + MP_USED(z_)=uz_; \ +}while(0) #endif #undef MIN |
