Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/intarray/_int.h2
-rw-r--r--contrib/pg_trgm/trgm_op.c2
-rw-r--r--contrib/tsearch2/rank.c6
3 files changed, 5 insertions, 5 deletions
diff --git a/contrib/intarray/_int.h b/contrib/intarray/_int.h
index bf10f109220..cee970d1b1f 100644
--- a/contrib/intarray/_int.h
+++ b/contrib/intarray/_int.h
@@ -108,7 +108,7 @@ typedef void (*formfloat) (ArrayType *, float *);
/*
** useful function
*/
-bool isort(int4 *a, const int len);
+bool isort(int4 *a, int len);
ArrayType *new_intArrayType(int num);
ArrayType *copy_intArrayType(ArrayType *a);
ArrayType *resize_intArrayType(ArrayType *a, int num);
diff --git a/contrib/pg_trgm/trgm_op.c b/contrib/pg_trgm/trgm_op.c
index 28690339327..f31b9bf572a 100644
--- a/contrib/pg_trgm/trgm_op.c
+++ b/contrib/pg_trgm/trgm_op.c
@@ -5,7 +5,7 @@
PG_MODULE_MAGIC;
-float4 trgm_limit = 0.3;
+float4 trgm_limit = 0.3f;
PG_FUNCTION_INFO_V1(set_limit);
Datum set_limit(PG_FUNCTION_ARGS);
diff --git a/contrib/tsearch2/rank.c b/contrib/tsearch2/rank.c
index f5de5c7746f..36fc2594009 100644
--- a/contrib/tsearch2/rank.c
+++ b/contrib/tsearch2/rank.c
@@ -37,7 +37,7 @@ Datum rank_cd_def(PG_FUNCTION_ARGS);
PG_FUNCTION_INFO_V1(get_covers);
Datum get_covers(PG_FUNCTION_ARGS);
-static float weights[] = {0.1, 0.2, 0.4, 1.0};
+static float weights[] = {0.1f, 0.2f, 0.4f, 1.0f};
#define wpos(wep) ( w[ WEP_GETWEIGHT(wep) ] )
@@ -59,7 +59,7 @@ static float4
word_distance(int4 w)
{
if (w > 100)
- return 1e-30;
+ return (float4)1e-30;
return 1.0 / (1.005 + 0.05 * exp(((float4) w) / 1.5 - 2));
}
@@ -331,7 +331,7 @@ calc_rank(float *w, tsvector * t, QUERYTYPE * q, int4 method)
calc_rank_and(w, t, q) : calc_rank_or(w, t, q);
if (res < 0)
- res = 1e-20;
+ res = (float)1e-20;
if ((method & RANK_NORM_LOGLENGTH) && t->size > 0)
res /= log((double) (cnt_length(t) + 1)) / log(2.0);