From: Rudi Heitbaum <rudi@heitbaum.com>
To: linux-bluetooth@vger.kernel.org
Cc: rudi@heitbaum.com
Subject: [PATCH 3/3] shared/gatt-helpers: fix -std=c23 build failure
Date: Wed, 20 Nov 2024 13:03:55 +0000 [thread overview]
Message-ID: <Zz3eO4higrwPKjG_@c8d99ad60702> (raw)
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/gatt-helpers.c:1136:24: error: incompatible types when returning type '_Bool' but 'struct bt_gatt_request *' was expected
1136 | return false;
| ^~~~~
src/shared/gatt-helpers.c:1250:24: error: incompatible types when returning type '_Bool' but 'struct bt_gatt_request *' was expected
1250 | return false;
| ^~~~~
src/shared/gatt-helpers.c:1478:24: error: incompatible types when returning type '_Bool' but 'struct bt_gatt_request *' was expected
1478 | return false;
| ^~~~~
Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
---
src/shared/gatt-helpers.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/shared/gatt-helpers.c b/src/shared/gatt-helpers.c
index 50fcb269b..f1fa6300a 100644
--- a/src/shared/gatt-helpers.c
+++ b/src/shared/gatt-helpers.c
@@ -1133,7 +1133,7 @@ struct bt_gatt_request *bt_gatt_discover_included_services(struct bt_att *att,
uint8_t pdu[6];
if (!att)
- return false;
+ return NULL;
op = new0(struct bt_gatt_request, 1);
op->att = att;
@@ -1247,7 +1247,7 @@ struct bt_gatt_request *bt_gatt_discover_characteristics(struct bt_att *att,
uint8_t pdu[6];
if (!att)
- return false;
+ return NULL;
op = new0(struct bt_gatt_request, 1);
op->att = att;
@@ -1475,7 +1475,7 @@ struct bt_gatt_request *bt_gatt_discover_descriptors(struct bt_att *att,
uint8_t pdu[4];
if (!att)
- return false;
+ return NULL;
op = new0(struct bt_gatt_request, 1);
op->att = att;
--
2.43.0
reply other threads:[~2024-11-20 13:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Zz3eO4higrwPKjG_@c8d99ad60702 \
--to=rudi@heitbaum.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox