From dd148d2b97700ff4e6170efc9f2e2b46493b5adf Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Fri, 31 Oct 2025 14:58:06 +0100 Subject: [PATCH] aplay/alsa: replace [[maybe_unused]] with GCC attr Some quite old GCC (7.5 in U18.04) don't have c23 function attributes. While this is a bit old distro but the feature is quite new according to C standard so use GCC attribute for now (we will almost certainly compile with clang/GCC in Linux). --- src/audio/playback/alsa.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/audio/playback/alsa.c b/src/audio/playback/alsa.c index 79e93b974..ec5f732b6 100644 --- a/src/audio/playback/alsa.c +++ b/src/audio/playback/alsa.c @@ -3,7 +3,7 @@ * @author Martin Pulec */ /* - * Copyright (c) 2011-2024 CESNET + * Copyright (c) 2011-2025 CESNET, zájmové sdružení právnických osob * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -155,12 +155,13 @@ struct state_alsa_playback { static void audio_play_alsa_write_frame(void *state, const struct audio_frame *frame); +static long get_sched_latency_ns(void) __attribute__((unused)); /** * @todo * the file /proc/sys/kernel/sched_latency_ns is no longer present * in current Linuxes - remove the function? */ -[[maybe_unused]] static long +static long get_sched_latency_ns(void) { const char *proc_file = "/proc/sys/kernel/sched_latency_ns";