From ffe711c3816a63152ff6e26e8adda29ccb4cb847 Mon Sep 17 00:00:00 2001 From: Indu Bhagat Date: Thu, 16 Oct 2025 11:20:21 -0700 Subject: [PATCH] libsframe: fix warning about argument of sframe_fre_sanity_check_p MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Recent commit (6ca8915c) added a new API sframe_fre_get_ra_undefined_p (). It has a 'const sframe_frame_row_entry *fre' argument, causing a warning in function ‘sframe_fre_get_ra_undefined_p’: libsframe/sframe.c:794:50: warning: passing argument 1 of ‘sframe_fre_sanity_check_p’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 794 | if (fre == NULL || !sframe_fre_sanity_check_p (fre)) | ^~~ libsframe/sframe.c:293:52: note: expected ‘sframe_frame_row_entry *’ but argument is of type ‘const sframe_frame_row_entry *’ 293 | sframe_fre_sanity_check_p (sframe_frame_row_entry *frep) | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~ Fix it by using const qualifier. libsframe/ * sframe.c (sframe_fre_sanity_check_p): Use const. --- libsframe/sframe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libsframe/sframe.c b/libsframe/sframe.c index 9d20f2e2d71..65f2c6c53ee 100644 --- a/libsframe/sframe.c +++ b/libsframe/sframe.c @@ -290,7 +290,7 @@ sframe_fre_start_addr_size (uint32_t fre_type) /* Check if the FREP has valid data. */ static bool -sframe_fre_sanity_check_p (sframe_frame_row_entry *frep) +sframe_fre_sanity_check_p (const sframe_frame_row_entry *frep) { uint8_t offset_size, offset_cnt; uint8_t fre_info; -- 2.47.3