[PATCH 1/4] settings: fix -std=c23 build failure
Sergei Trofimovich <[email protected]> Sun, 17 Nov 2024 00:18:11 +0000
| Newsgroups | dev.linux.lists.ell |
|---|---|
| Message-ID | <[email protected]> |
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/settings.c: In function 'l_settings_get_embedded_value':
ell/settings.c:1521:24: error: incompatible types when returning type '_Bool' but 'const char *' was expected
1521 | return false;
| ^~~~~
The change uses poiter instead of a bool to return the zero value.
---
ell/settings.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ell/settings.c b/ell/settings.c
index a5f17d1..b46d00b 100644
--- a/ell/settings.c
+++ b/ell/settings.c
@@ -1518,7 +1518,7 @@ LIB_EXPORT const char *l_settings_get_embedded_value(
struct embedded_group_data *group;
if (unlikely(!settings))
- return false;
+ return NULL;
group = l_queue_find(settings->embedded_groups,
embedded_group_match, group_name);
--
2.47.0