From cc1f2ac99b99eede36a58cf115a56bdfbc977e52 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 27 Nov 2025 16:50:19 +0100 Subject: [PATCH] eject: fix const qualifier warning in read_speed Fix const qualifier discarded warning in read_speed(). This warning is reported by gcc 15 which defaults to the C23 standard. The strrchr() function returns a pointer into a const string, so the receiving variable must be declared as const char *. Signed-off-by: Karel Zak --- sys-utils/eject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys-utils/eject.c b/sys-utils/eject.c index f5d48badb..0debd0df3 100644 --- a/sys-utils/eject.c +++ b/sys-utils/eject.c @@ -492,7 +492,7 @@ static void select_speed(const struct eject_control *ctl) static int read_speed(const char *devname) { int drive_number = -1; - char *name; + const char *name; FILE *f; f = fopen(_PATH_PROC_CDROMINFO, "r"); -- 2.47.3