1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

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
This commit is contained in:
Tom Lane
2018-05-20 11:40:54 -04:00
parent e7a808f947
commit c6e846446d
9 changed files with 9 additions and 9 deletions

View File

@ -563,7 +563,7 @@ bt_metap(PG_FUNCTION_ARGS)
if (metad->btm_version == BTREE_VERSION)
{
values[j++] = psprintf("%u", metad->btm_oldest_btpo_xact);
values[j++] = psprintf("%lf", metad->btm_last_cleanup_num_heap_tuples);
values[j++] = psprintf("%f", metad->btm_last_cleanup_num_heap_tuples);
}
else
{