Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add extra NULL argument at the end of fail* APIs
The fail, fail_unless, and fail_if APIS were expected to contain a message explaining the failure. This was never enforced, and it was possible to write unit tests without providing messages. In github.com//pull/249 a change was introduced to add printf argument checking to the Check assert APIS, including the fail APIs. There were a few fixes for this in github.com/libcheck/check/releases/tag/0.15.1. Those changes proved problematic for the uses of the fail* APIs without arguments, as those uses were now flagged as missing the necessary arguments. A fix proposed by heftig in github.com//issues/293 is to add a new NULL to the end of every fail* call in the macro itself. For users of these APIs who do pass a message there will be a new warning about too many arguments. As the fail APIs are deprecated, this new warning is a reasonable trade-off, and can be avoided by switching fail* calls to ck_assert* calls.
- Loading branch information