aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2014-04-13 11:00:11 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2014-04-13 11:00:11 -0400
commit46a60abfe9fa13087dbbe15953c20df35f006968 (patch)
tree1fa4094c2a2aeffdc7daa0d263e8256fe7c4da56
parent5f508b6dea19b66961c645bf5e5c427ac3af8359 (diff)
downloadpostgresql-46a60abfe9fa13087dbbe15953c20df35f006968.tar.gz
postgresql-46a60abfe9fa13087dbbe15953c20df35f006968.zip
Suppress compiler warning in new contrib/pg_trgm code.
MSVC doesn't seem to like it when a constant initializer loses precision upon being assigned. David Rowley
-rw-r--r--contrib/pg_trgm/trgm_regexp.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/contrib/pg_trgm/trgm_regexp.c b/contrib/pg_trgm/trgm_regexp.c
index 2e6fa219350..9720408a025 100644
--- a/contrib/pg_trgm/trgm_regexp.c
+++ b/contrib/pg_trgm/trgm_regexp.c
@@ -227,14 +227,14 @@
* Numbers based on analysis of real-life texts.
*/
const float4 penalties[8] = {
- 1.0, /* "aaa" */
- 3.5, /* "aa " */
- 0.0, /* "a a" (impossible) */
- 0.0, /* "a " (impossible) */
- 4.2, /* " aa" */
- 2.1, /* " a " */
- 25.0, /* " a" */
- 0.0 /* " " (impossible) */
+ 1.0f, /* "aaa" */
+ 3.5f, /* "aa " */
+ 0.0f, /* "a a" (impossible) */
+ 0.0f, /* "a " (impossible) */
+ 4.2f, /* " aa" */
+ 2.1f, /* " a " */
+ 25.0f, /* " a" */
+ 0.0f /* " " (impossible) */
};
/* Struct representing a single pg_wchar, converted back to multibyte form */