diff options
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/btree_gist/btree_ts.c | 5 | ||||
-rw-r--r-- | contrib/btree_gist/btree_utils_num.h | 2 | ||||
-rw-r--r-- | contrib/pg_trgm/trgm.h | 2 | ||||
-rw-r--r-- | contrib/pgcrypto/crypt-blowfish.c | 12 |
4 files changed, 12 insertions, 9 deletions
diff --git a/contrib/btree_gist/btree_ts.c b/contrib/btree_gist/btree_ts.c index 3b07969dee8..2671ba961cd 100644 --- a/contrib/btree_gist/btree_ts.c +++ b/contrib/btree_gist/btree_ts.c @@ -341,12 +341,13 @@ gbt_ts_union(PG_FUNCTION_ARGS) } -#define penalty_check_max_float(val) do { \ +#define penalty_check_max_float(val) \ + do { \ if ( val > FLT_MAX ) \ val = FLT_MAX; \ if ( val < -FLT_MAX ) \ val = -FLT_MAX; \ -} while(false); + } while (0) Datum diff --git a/contrib/btree_gist/btree_utils_num.h b/contrib/btree_gist/btree_utils_num.h index 1fedfbe82da..cec69861726 100644 --- a/contrib/btree_gist/btree_utils_num.h +++ b/contrib/btree_gist/btree_utils_num.h @@ -74,7 +74,7 @@ typedef struct (*(result)) += (float) ( ((double)(tmp)) / ( (double)(tmp) + ( ((double)(oupper))*0.49F - ((double)(olower))*0.49F ) ) ); \ (*(result)) *= (FLT_MAX / (((GISTENTRY *) PG_GETARG_POINTER(0))->rel->rd_att->natts + 1)); \ } \ -} while (0); +} while (0) /* diff --git a/contrib/pg_trgm/trgm.h b/contrib/pg_trgm/trgm.h index 0c34b96d808..b616953462e 100644 --- a/contrib/pg_trgm/trgm.h +++ b/contrib/pg_trgm/trgm.h @@ -48,7 +48,7 @@ typedef char trgm[3]; *(((char*)(a))+0) = *(((char*)(b))+0); \ *(((char*)(a))+1) = *(((char*)(b))+1); \ *(((char*)(a))+2) = *(((char*)(b))+2); \ -} while(0); +} while(0) #ifdef KEEPONLYALNUM #define ISWORDCHR(c) (t_isalpha(c) || t_isdigit(c)) diff --git a/contrib/pgcrypto/crypt-blowfish.c b/contrib/pgcrypto/crypt-blowfish.c index ed69c0c6bb3..a663852ccf9 100644 --- a/contrib/pgcrypto/crypt-blowfish.c +++ b/contrib/pgcrypto/crypt-blowfish.c @@ -469,7 +469,7 @@ BF_swap(BF_word *x, int count) tmp3 ^= tmp2; \ (R) ^= data.ctx.P[(N) + 1]; \ tmp3 += tmp1; \ - (R) ^= tmp3; + (R) ^= tmp3 #else /* Architectures with no complicated addressing modes supported */ #define BF_INDEX(S, i) \ @@ -490,7 +490,7 @@ BF_swap(BF_word *x, int count) tmp3 ^= tmp2; \ (R) ^= data.ctx.P[(N) + 1]; \ tmp3 += tmp1; \ - (R) ^= tmp3; + (R) ^= tmp3 #endif /* @@ -516,17 +516,18 @@ BF_swap(BF_word *x, int count) BF_ROUND(R, L, 15); \ tmp4 = R; \ R = L; \ - L = tmp4 ^ data.ctx.P[BF_N + 1]; + L = tmp4 ^ data.ctx.P[BF_N + 1] #if BF_ASM extern void _BF_body_r(BF_ctx *ctx); #define BF_body() \ - _BF_body_r(&data.ctx); + _BF_body_r(&data.ctx) #else #define BF_body() \ +do { \ L = R = 0; \ ptr = data.ctx.P; \ do { \ @@ -542,7 +543,8 @@ extern void _BF_body_r(BF_ctx *ctx); BF_ENCRYPT; \ *(ptr - 2) = L; \ *(ptr - 1) = R; \ - } while (ptr < &data.ctx.S[3][0xFF]); + } while (ptr < &data.ctx.S[3][0xFF]); \ +} while (0) #endif static void |