]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
libsframe: fix warning about argument of sframe_fre_sanity_check_p
authorIndu Bhagat <indu.bhagat@oracle.com>
Thu, 16 Oct 2025 18:20:21 +0000 (11:20 -0700)
committerIndu Bhagat <indu.bhagat@oracle.com>
Thu, 16 Oct 2025 18:21:02 +0000 (11:21 -0700)
commitffe711c3816a63152ff6e26e8adda29ccb4cb847
tree9155d88638e630a5b25a49d3ffcd26beaa810a2d
parenta29e78be09e3eae56f7f7a18576d18d104639d79
libsframe: fix warning about argument of sframe_fre_sanity_check_p

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