From 72e3d7ad088d3229d053db9cf7e8d2298a8be172 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Sat, 2 May 2026 12:27:18 +0200 Subject: [PATCH] util/path: fix compile warning util-path.c:251:11: error: initializing 'char *' with an expression of type 'const char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] 251 | char *final = strrchr(path, DIRECTORY_SEPARATOR); | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. --- src/util-path.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util-path.c b/src/util-path.c index 0284864bdb..d7618856e4 100644 --- a/src/util-path.c +++ b/src/util-path.c @@ -248,7 +248,7 @@ const char *SCBasename(const char *path) if (!path || strlen(path) == 0) return NULL; - char *final = strrchr(path, DIRECTORY_SEPARATOR); + const char *final = strrchr(path, DIRECTORY_SEPARATOR); if (!final) return path;