[glib: 1/2] glib/tests: Fix NULL reference on >= C++11




commit b8c4a3e13bf8940e6f3881408ae8a033db897e51
Author: Pablo Correa Gómez <ablocorrea hotmail com>
Date:   Tue Jan 18 16:46:58 2022 +0100

    glib/tests: Fix NULL reference on >= C++11
    
    Fixes #2582

 glib/tests/cxx.cpp | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/glib/tests/cxx.cpp b/glib/tests/cxx.cpp
index c423b2fbc..be0a6bfa1 100644
--- a/glib/tests/cxx.cpp
+++ b/glib/tests/cxx.cpp
@@ -56,7 +56,11 @@ test_typeof (void)
 int
 main (int argc, char *argv[])
 {
+#if __cplusplus >= 201103L
+  g_test_init (&argc, &argv, nullptr);
+#else
   g_test_init (&argc, &argv, NULL);
+#endif
 
   g_test_add_func ("/C++/typeof", test_typeof);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]