From 5bd52ac2e51068faa101e2e64086222d7e6bb526 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 17 Nov 2024 18:16:31 +0000 Subject: [PATCH] src/clients/lib/xmmsclient/visualization/unixshm.c: fix `-std=c23` build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gcc-15 switched to -std=c23 by default: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=55e3bd376b2214e200fa76d12b67ff259b06c212 Without the change the build fails as: ../src/clients/lib/xmmsclient/visualization/unixshm.c:31:24: error: incompatible types when returning type ‘_Bool’ but ‘xmmsc_result_t *’ {aka ‘struct xmmsc_result_St *’} was expected 31 | return false; | ^~~~~ --- src/clients/lib/xmmsclient/visualization/unixshm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/clients/lib/xmmsclient/visualization/unixshm.c b/src/clients/lib/xmmsclient/visualization/unixshm.c index 813ddfe29..06500c958 100644 --- a/src/clients/lib/xmmsclient/visualization/unixshm.c +++ b/src/clients/lib/xmmsclient/visualization/unixshm.c @@ -28,7 +28,7 @@ setup_shm_prepare (xmmsc_connection_t *c, int32_t vv) t->shmid = shmget (IPC_PRIVATE, sizeof (xmmsc_vischunk_t) * XMMS_VISPACKET_SHMCOUNT, S_IRWXU + S_IRWXG + S_IRWXO); if (t->shmid == -1) { c->error = strdup ("Couldn't create the shared memory!"); - return false; + return NULL; } /* attach early, so that the server doesn't think we aren't there */ buffer = shmat(t->shmid, NULL, SHM_RDONLY);