diff mbox series

[1/3] shared/ad: fix -std=c23 build failure

Message ID Zz3eAJcwA--0n5lf@c8d99ad60702
State New
Headers show
Series [1/3] shared/ad: fix -std=c23 build failure | expand

Commit Message

Rudi Heitbaum Nov. 20, 2024, 1:02 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/ad.c:1090:24: error: incompatible types when returning type '_Bool' but 'const char *' was expected
     1090 |                 return false;
          |                        ^~~~~

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

Comments

patchwork-bot+bluetooth@kernel.org Nov. 20, 2024, 3:20 p.m. UTC | #1
Hello:

This series was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Wed, 20 Nov 2024 13:02:56 +0000 you wrote:
> 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/ad.c:1090:24: error: incompatible types when returning type '_Bool' but 'const char *' was expected
>      1090 |                 return false;
>           |                        ^~~~~
> 
> [...]

Here is the summary with links:
  - [1/3] shared/ad: fix -std=c23 build failure
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=da5b5b0ecb1e
  - [2/3] shared/shell: fix -std=c23 build failure
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=4d60826865c7
  - [3/3] shared/gatt-helpers: fix -std=c23 build failure
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=6f3111eb680d

You are awesome, thank you!
diff mbox series

Patch

diff --git a/src/shared/ad.c b/src/shared/ad.c
index d08ce7af9..dac381bbe 100644
--- a/src/shared/ad.c
+++ b/src/shared/ad.c
@@ -1087,7 +1087,7 @@  bool bt_ad_add_name(struct bt_ad *ad, const char *name)
 const char *bt_ad_get_name(struct bt_ad *ad)
 {
 	if (!ad)
-		return false;
+		return NULL;
 
 	return ad->name;
 }