diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2018-05-20 11:40:54 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2018-05-20 11:40:54 -0400 |
commit | 29a4db65fbb752b2c0b212f331eb375532a7b9d9 (patch) | |
tree | 58b6874c29062525a416cab74a267f57e84d04c3 /src/interfaces/ecpg/test/expected/sql-sqlda.c | |
parent | 7329af6b9ebf9c6167366870cb9304410b4617fd (diff) | |
download | postgresql-29a4db65fbb752b2c0b212f331eb375532a7b9d9.tar.gz postgresql-29a4db65fbb752b2c0b212f331eb375532a7b9d9.zip |
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/expected/sql-sqlda.c')
-rw-r--r-- | src/interfaces/ecpg/test/expected/sql-sqlda.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/interfaces/ecpg/test/expected/sql-sqlda.c b/src/interfaces/ecpg/test/expected/sql-sqlda.c index 9aa24cfa5eb..2f034a0156c 100644 --- a/src/interfaces/ecpg/test/expected/sql-sqlda.c +++ b/src/interfaces/ecpg/test/expected/sql-sqlda.c @@ -158,7 +158,7 @@ dump_sqlda(sqlda_t *sqlda) break; #endif case ECPGt_double: - printf("name sqlda descriptor: '%s' value %lf\n", sqlda->sqlvar[i].sqlname.data, *(double *)sqlda->sqlvar[i].sqldata); + printf("name sqlda descriptor: '%s' value %f\n", sqlda->sqlvar[i].sqlname.data, *(double *)sqlda->sqlvar[i].sqldata); break; case ECPGt_numeric: { |