Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4cb389a

Browse files
committed
Reformat imath.c macro to remove -Wmisleading-indentation warnings.
Recent versions of gcc whine about the admittedly-completely-illegibleformatting of this macro. We've not noticed for a few reasons:* In v12 and up, the problem is gone thanks to48e24ba.(Back-patching that doesn't seem prudent, though, so this patchjust 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 thewarning because it gets buried in an install.log file. You have todo "make -C contrib all" or the like to see it.I noticed this because in older branches, the last bit doesn'thappen so "check-world" actually does spew the warnings to stderr.Maybe we should rethink how that works, because the newer behavioris not an improvement IMO.Back-patch down to 9.2, pursuant to newly-established project policyabout keeping out-of-support branches buildable.Discussion:https://postgr.es/m/d0316012-ece7-7b7e-2d36-9c38cb77cb3b@enterprisedb.com
1 parente51e8fb commit4cb389a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

‎contrib/pgcrypto/imath.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,13 @@ do{T *u_=(A),*v_=u_+(N)-1;while(u_<v_){T xch=*u_;*u_++=*v_;*v_--=xch;}}while(0)
129129
#defineCLAMP(Z) s_clamp(Z)
130130
#else
131131
#defineCLAMP(Z) \
132-
do{mp_int z_=(Z);mp_size uz_=MP_USED(z_);mp_digit *dz_=MP_DIGITS(z_)+uz_-1;\
133-
while(uz_ > 1 && (*dz_-- == 0)) --uz_;MP_USED(z_)=uz_;}while(0)
132+
do{ \
133+
mp_int z_=(Z); \
134+
mp_size uz_=MP_USED(z_); \
135+
mp_digit *dz_=MP_DIGITS(z_)+uz_-1; \
136+
while(uz_ > 1 && (*dz_-- == 0)) --uz_; \
137+
MP_USED(z_)=uz_; \
138+
}while(0)
134139
#endif
135140

136141
#undef MIN

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp