diff mbox series

[3/4] dbus: fix -std=c23 build failure

Message ID 20241117001814.2149181-3-slyich@gmail.com (mailing list archive)
State Accepted, archived
Headers show
Series [1/4] settings: fix -std=c23 build failure | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success

Commit Message

Sergei Trofimovich Nov. 17, 2024, 12:18 a.m. UTC
gcc-15 switched to -std=c23 by default:

    https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=55e3bd376b2214e200fa76d12b67ff259b06c212

As a result `ell` fails the build as:

    ell/dbus.c:1700:24: error: incompatible types when returning type '_Bool' but 'void *' was expected
     1700 |                 return false;
          |                        ^~~~~
---
 ell/dbus.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/ell/dbus.c b/ell/dbus.c
index bd6e1b8..1ab4ded 100644
--- a/ell/dbus.c
+++ b/ell/dbus.c
@@ -1697,10 +1697,10 @@  LIB_EXPORT void *l_dbus_object_get_data(struct l_dbus *dbus, const char *object,
 					const char *interface)
 {
 	if (unlikely(!dbus))
-		return false;
+		return NULL;
 
 	if (unlikely(!dbus->tree))
-		return false;
+		return NULL;
 
 	return _dbus_object_tree_get_interface_data(dbus->tree, object,
 							interface);