savonet/liquidsoap — pull request #189 by planar (2014-09-07 14:22:51+00:00)
Title: fix invalid printf format

There are some format strings that are "invalid" in the liquidsoap sources.

In general, invalid formats are nonsensical format strings that were accepted in OCaml 4.01.0 and earlier, but whose semantics is unspecified. They are still accepted by the new Printf implementation of OCaml 4.02.0 but in some cases with different semantics, and they will be statically rejected by OCaml 4.03.0.

You can check for them in OCaml 4.02.0 with the flag -strict-formats.

In the case of liquidsoap, I think the behavior has not changed between 4.01.0 and 4.02.0. The only invalid format is "%.f". This is considered invalid beause it specifies limited precision without giving the limit. Even though the behaviour has not changed, you should take the opportunity to review the code and fix the format. The patch changes it to "%.0f", which keeps the behaviour unchanged, but that might still be wrong.