summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2022-10-29 04:16:00 +0200
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2022-10-31 12:02:55 +0100
commit7dc19632f3115e3f517c6bc80436fe72c1dcdeb4 (patch)
treebf263f41c7b25ce886617419ccc22e16eed5f42e
parentd7a6305ba472392d48e193006dacc510ab7a32f5 (diff)
downloadglib-7dc19632f3115e3f517c6bc80436fe72c1dcdeb4.tar.gz
glib/tests/cxx: Ensure NULL is always casted to a pointer type
Otherwise it may not be recognized as valid sentinel
-rw-r--r--glib/tests/cxx.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/glib/tests/cxx.cpp b/glib/tests/cxx.cpp
index 045457c6e..aa5e0cb57 100644
--- a/glib/tests/cxx.cpp
+++ b/glib/tests/cxx.cpp
@@ -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);