mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-10 03:04:05 +02:00
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:
@@ -186,7 +186,11 @@ test_steal_pointer (void)
|
|||||||
int
|
int
|
||||||
main (int argc, char *argv[])
|
main (int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
#if __cplusplus >= 201103L
|
||||||
g_test_init (&argc, &argv, NULL);
|
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++/typeof", test_typeof);
|
||||||
g_test_add_func ("/C++/atomic-pointer-compare-and-exchange", test_atomic_pointer_compare_and_exchange);
|
g_test_add_func ("/C++/atomic-pointer-compare-and-exchange", test_atomic_pointer_compare_and_exchange);
|
||||||
|
Reference in New Issue
Block a user