Skip to content

tests: Fix order of arguments in a format string

Steven Keuchel requested to merge skeuchel/tinysparql:fix-tests into main

The escape_uri_vprintf test uses a format string which includes an asterisk for the precision of a floating point number. This and the corresponding va_list are passed to vasprintf, at least on my system. So they should follow the C standard ordering which states:

As noted previously, a field width, or precision, or both, may be indicated by an asterisk. In this case, an int argument supplies the field width or precision. The arguments specifying field width, or precision, or both, shall appear (in that order) before the argument (if any) to be converted.

This MR fixes the order so the int argument comes first. This fixes #474 (closed) for riscv64-linux-gnu, but I assume it will also fix it for the musl platforms.

Edited by Steven Keuchel

Merge request reports

Loading