]> git.ipfire.org Git - thirdparty/strongswan.git/commit
unit-tests: Use function pointers to test generic return_* helper functions
authorTobias Brunner <tobias@strongswan.org>
Mon, 15 Jan 2024 12:39:32 +0000 (13:39 +0100)
committerTobias Brunner <tobias@strongswan.org>
Tue, 16 Jan 2024 10:00:29 +0000 (11:00 +0100)
commit52d618989289f64dcd519608d55b94310cf3a647
tree13137cd3a8ff70cf071cd1f83f7211d03786dcea
parentbf017a9d17b848f10f68566e147e6a6da0b4c570
unit-tests: Use function pointers to test generic return_* helper functions

These functions are declared without arguments, passing arguments to them
causes warnings such as the following with newer compilers:

  passing arguments to 'return_null' without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]

We only use them via function pointers, which doesn't trigger any warnings
and hopefully continues to work.
src/libstrongswan/tests/suites/test_utils.c