aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2022-08-31 09:31:22 -0700
committerAndres Freund <andres@anarazel.de>2022-08-31 09:31:22 -0700
commit483ac6476198c66696b725d49aa42290a9a94a95 (patch)
tree43272997d295d78eadf9bb6b7802029b9d860451 /src
parent1058555a5eccffd17c47edf3e15dd7e26934b492 (diff)
downloadpostgresql-483ac6476198c66696b725d49aa42290a9a94a95.tar.gz
postgresql-483ac6476198c66696b725d49aa42290a9a94a95.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/interfaces/ecpg/test/compat_informix/rnull.pgc2
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-rnull.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/interfaces/ecpg/test/compat_informix/rnull.pgc b/src/interfaces/ecpg/test/compat_informix/rnull.pgc
index a6ad35e3bc9..232629fcd4a 100644
--- a/src/interfaces/ecpg/test/compat_informix/rnull.pgc
+++ b/src/interfaces/ecpg/test/compat_informix/rnull.pgc
@@ -16,7 +16,7 @@ int main(void)
$short s = 17;
$int i = -74874;
$bool b = 1;
- $float f = 3.71;
+ $float f = (float) 3.71;
$long l = 487444;
$double dbl = 404.404;
$decimal dec;
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-rnull.c b/src/interfaces/ecpg/test/expected/compat_informix-rnull.c
index d7ba69c1fbf..3efb2be117b 100644
--- a/src/interfaces/ecpg/test/expected/compat_informix-rnull.c
+++ b/src/interfaces/ecpg/test/expected/compat_informix-rnull.c
@@ -58,7 +58,7 @@ int main(void)
#line 19 "rnull.pgc"
- float f = 3.71 ;
+ float f = ( float ) 3.71 ;
#line 19 "rnull.pgc"