glib/tests/cxx: Ensure NULL is always casted to a pointer type

Otherwise it may not be recognized as valid sentinel
This commit is contained in:
Marco Trevisan (Treviño) 2022-10-29 04:16:00 +02:00
parent d7a6305ba4
commit 7dc19632f3

View File

@ -186,7 +186,11 @@ test_steal_pointer (void)
int
main (int argc, char *argv[])
{
#if __cplusplus >= 201103L
g_test_init (&argc, &argv, NULL);
#else
g_test_init (&argc, &argv, static_cast<void *>(NULL));
#endif
g_test_add_func ("/C++/typeof", test_typeof);
g_test_add_func ("/C++/atomic-pointer-compare-and-exchange", test_atomic_pointer_compare_and_exchange);