diff mbox series

[2/3] shared/shell: fix -std=c23 build failure

Message ID Zz3eIRBHrG7DHWiO@c8d99ad60702 (mailing list archive)
State Accepted
Commit 4d60826865c760cc4e5718b6414746a394768110
Headers show
Series [1/3] shared/ad: fix -std=c23 build failure | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success

Commit Message

Rudi Heitbaum Nov. 20, 2024, 1:03 p.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 `bluez` fails the build as:

    src/shared/shell.c:365:24: error: incompatible types when returning type '_Bool' but 'struct input *' was expected
      365 |                 return false;
          |                        ^~~~~

Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
---
 src/shared/shell.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/src/shared/shell.c b/src/shared/shell.c
index a8fa87696..aa6c16c8c 100644
--- a/src/shared/shell.c
+++ b/src/shared/shell.c
@@ -362,7 +362,7 @@  static struct input *input_new(int fd)
 
 	io = io_new(fd);
 	if (!io)
-		return false;
+		return NULL;
 
 	input = new0(struct input, 1);
 	input->io = io;