Skip to content

Commit 483ac64

Browse files
committed
Fix MSVC warning in compat_informix/rnull.pgc
Building the ecpg tests with MSVC, with warnings enabled, results in the following warning: src/interfaces/ecpg/test/compat_informix/rnull.pgc(19,1): warning C4305: 'initializing': truncation from 'double' to 'float' The more obvious fix would be an 'f' suffix, but ecpg can't parse that. Reviewed-by: Peter Eisentraut <peter.eisentraut@enterprisedb.com> Discussion: https://postgr.es/m/2180a97c-c026-1b6c-cec8-d6e499f97017@enterprisedb.com
1 parent 1058555 commit 483ac64

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/interfaces/ecpg/test/compat_informix/rnull.pgc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ int main(void)
1616
$short s = 17;
1717
$int i = -74874;
1818
$bool b = 1;
19-
$float f = 3.71;
19+
$float f = (float) 3.71;
2020
$long l = 487444;
2121
$double dbl = 404.404;
2222
$decimal dec;

src/interfaces/ecpg/test/expected/compat_informix-rnull.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ int main(void)
5858

5959

6060
#line 19 "rnull.pgc"
61-
float f = 3.71 ;
61+
float f = ( float ) 3.71 ;
6262

6363
#line 19 "rnull.pgc"
6464

0 commit comments

Comments
 (0)