Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 46a60ab

Browse files
committed
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
1 parent 5f508b6 commit 46a60ab

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

contrib/pg_trgm/trgm_regexp.c

+8-8
Original file line numberDiff line numberDiff line change
@@ -227,14 +227,14 @@
227227
* Numbers based on analysis of real-life texts.
228228
*/
229229
const float4 penalties[8] = {
230-
1.0, /* "aaa" */
231-
3.5, /* "aa " */
232-
0.0, /* "a a" (impossible) */
233-
0.0, /* "a " (impossible) */
234-
4.2, /* " aa" */
235-
2.1, /* " a " */
236-
25.0, /* " a" */
237-
0.0 /* " " (impossible) */
230+
1.0f, /* "aaa" */
231+
3.5f, /* "aa " */
232+
0.0f, /* "a a" (impossible) */
233+
0.0f, /* "a " (impossible) */
234+
4.2f, /* " aa" */
235+
2.1f, /* " a " */
236+
25.0f, /* " a" */
237+
0.0f /* " " (impossible) */
238238
};
239239

240240
/* Struct representing a single pg_wchar, converted back to multibyte form */

0 commit comments

Comments
 (0)