From 16d227b62089de5b60eea2c9898db8f825ae36de Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Sat, 2 May 2026 12:24:52 +0200 Subject: [PATCH] detect/app-layer-protocol: fix compile warning detect-app-layer-protocol.c:160:11: error: initializing 'char *' with an expression of type 'const char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] 160 | char *sep = strchr(arg, ','); | ^ ~~~~~~~~~~~~~~~~ 1 error generated. (cherry picked from commit 3564f2f92885e856bffa7d3a54db431c70805756) --- src/detect-app-layer-protocol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/detect-app-layer-protocol.c b/src/detect-app-layer-protocol.c index 46c8254960..fab270ae6f 100644 --- a/src/detect-app-layer-protocol.c +++ b/src/detect-app-layer-protocol.c @@ -157,7 +157,7 @@ static DetectAppLayerProtocolData *DetectAppLayerProtocolParse(const char *arg, AppProto alproto = ALPROTO_UNKNOWN; char alproto_copy[MAX_ALPROTO_NAME]; - char *sep = strchr(arg, ','); + const char *sep = strchr(arg, ','); char *alproto_name; if (sep && sep - arg < MAX_ALPROTO_NAME) { strlcpy(alproto_copy, arg, sep - arg + 1);