summaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/test/preproc/outofscope.pgc
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2018-05-20 11:40:54 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2018-05-20 11:40:54 -0400
commit9c515f77d6cffb6f2576c5e9895cc0f29cc6279c (patch)
tree501c3dcccef6325d47142fa13bc71a1afebf3aaa /src/interfaces/ecpg/test/preproc/outofscope.pgc
parent22d22e4bddf65559453506f4090a6cae0f010b96 (diff)
printf("%lf") is not portable, so omit the "l".
The "l" (ell) width spec means something in the corresponding scanf usage, but not here. While modern POSIX says that applying "l" to "f" and other floating format specs is a no-op, SUSv2 says it's undefined. Buildfarm experience says that some old compilers emit warnings about it, and at least one old stdio implementation (mingw's "ANSI" option) actually produces wrong answers and/or crashes. Discussion: https://postgr.es/m/21670.1526769114@sss.pgh.pa.us Discussion: https://postgr.es/m/c085e1da-0d64-1c15-242d-c921f32e0d5c@dunslane.net
Diffstat (limited to 'src/interfaces/ecpg/test/preproc/outofscope.pgc')
-rw-r--r--src/interfaces/ecpg/test/preproc/outofscope.pgc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/interfaces/ecpg/test/preproc/outofscope.pgc b/src/interfaces/ecpg/test/preproc/outofscope.pgc
index 6b5d2707cef..63221147296 100644
--- a/src/interfaces/ecpg/test/preproc/outofscope.pgc
+++ b/src/interfaces/ecpg/test/preproc/outofscope.pgc
@@ -101,7 +101,7 @@ main (void)
get_record1();
if (sqlca.sqlcode == ECPG_NOT_FOUND)
break;
- printf("id=%d%s t='%s'%s d1=%lf%s d2=%lf%s c = '%s'%s\n",
+ printf("id=%d%s t='%s'%s d1=%f%s d2=%f%s c = '%s'%s\n",
myvar->id, mynullvar->id ? " (NULL)" : "",
myvar->t, mynullvar->t ? " (NULL)" : "",
myvar->d1, mynullvar->d1 ? " (NULL)" : "",