Skip to content

Commit dd148d2

Browse files
committed
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).
1 parent 960a362 commit dd148d2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/audio/playback/alsa.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @author Martin Pulec <[email protected]>
44
*/
55
/*
6-
* Copyright (c) 2011-2024 CESNET
6+
* Copyright (c) 2011-2025 CESNET, zájmové sdružení právnických osob
77
* All rights reserved.
88
*
99
* Redistribution and use in source and binary forms, with or without
@@ -155,12 +155,13 @@ struct state_alsa_playback {
155155

156156
static void audio_play_alsa_write_frame(void *state, const struct audio_frame *frame);
157157

158+
static long get_sched_latency_ns(void) __attribute__((unused));
158159
/**
159160
* @todo
160161
* the file /proc/sys/kernel/sched_latency_ns is no longer present
161162
* in current Linuxes - remove the function?
162163
*/
163-
[[maybe_unused]] static long
164+
static long
164165
get_sched_latency_ns(void)
165166
{
166167
const char *proc_file = "/proc/sys/kernel/sched_latency_ns";

0 commit comments

Comments
 (0)