Skip to content

Commit bab16af

Browse files
committed
Fix msvc warnings, patch by Hannes Eder <Hannes@HannesEder.net>
1 parent 282d2a0 commit bab16af

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/backend/utils/adt/tsrank.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/backend/utils/adt/tsrank.c,v 1.7 2007/09/13 06:54:35 teodor Exp $
10+
* $PostgreSQL: pgsql/src/backend/utils/adt/tsrank.c,v 1.8 2007/09/20 18:10:57 teodor Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -21,7 +21,7 @@
2121
#include "miscadmin.h"
2222

2323

24-
static float weights[] = {0.1, 0.2, 0.4, 1.0};
24+
static float weights[] = {0.1f, 0.2f, 0.4f, 1.0f};
2525

2626
#define wpos(wep) ( w[ WEP_GETWEIGHT(wep) ] )
2727

@@ -43,7 +43,7 @@ static float4
4343
word_distance(int4 w)
4444
{
4545
if (w > 100)
46-
return 1e-30;
46+
return 1e-30f;
4747

4848
return 1.0 / (1.005 + 0.05 * exp(((float4) w) / 1.5 - 2));
4949
}
@@ -336,7 +336,7 @@ calc_rank(float *w, TSVector t, TSQuery q, int4 method)
336336
calc_rank_and(w, t, q) : calc_rank_or(w, t, q);
337337

338338
if (res < 0)
339-
res = 1e-20;
339+
res = 1e-20f;
340340

341341
if ((method & RANK_NORM_LOGLENGTH) && t->size > 0)
342342
res /= log((double) (cnt_length(t) + 1)) / log(2.0);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy