From: Miroslav Lichvar Date: Tue, 9 Jun 2026 06:41:16 +0000 (+0200) Subject: util: fix discarded-qualifiers warning in UTI_PathToDir() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea8e20310ded7f3de1ce03f807f43e2418ef8ab1;p=thirdparty%2Fchrony.git util: fix discarded-qualifiers warning in UTI_PathToDir() With new glibc strrchr() seems to return "const char *" when the input is const, which triggers the -Wdiscarded-qualifiers warning. --- diff --git a/util.c b/util.c index 3939e1eb..b3117d35 100644 --- a/util.c +++ b/util.c @@ -1154,8 +1154,9 @@ UTI_SetQuitSignalsHandler(void (*handler)(int), int ignore_sigpipe) char * UTI_PathToDir(const char *path) { - char *dir, *slash; + const char *slash; size_t dir_len; + char *dir; slash = strrchr(path, '/');