Bug: From b5280929c58559c178415ce199157b5c87171258 Mon Sep 17 00:00:00 2001 From: Brahmajit Das Date: Tue, 20 Feb 2024 12:05:57 +0530 Subject: [PATCH 1/1] Fix passing incompatible pointer type with GCC 14 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GCC 14 (and newer compilers like Clang 16) enables -Wincompatible-pointer-types by default, along with some other flags. Thus resulting in build errors such as util-host-info.c: In function ‘SCKernelVersionIsAtLeast’: util-host-info.c:94:31: error: passing argument 1 of ‘pcre2_substring_list_free_8’ from incompatible pointer type [-Wincompatible-pointer-types] 94 | pcre2_substring_list_free((PCRE2_SPTR *)list); | ^~~~~~~~~~~~~~~~~~ | | | const PCRE2_UCHAR8 ** {aka const unsigned char **} Removing the casting make suricata build with GCC 14. First discovered on Gentoo Linux with GCC 14 Bug: https://bugs.gentoo.org/925011 Signed-off-by: Brahmajit Das --- a/src/util-host-info.c +++ b/src/util-host-info.c @@ -91,7 +91,7 @@ int SCKernelVersionIsAtLeast(int major, int minor) err = true; } - pcre2_substring_list_free((PCRE2_SPTR *)list); + pcre2_substring_list_free(list); pcre2_match_data_free(version_regex_match); pcre2_code_free(version_regex); -- 2.43.2