From b8d39fd810e7373aac4f129c34813f6a609d8d5f Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sat, 2 May 2026 18:56:51 +0200 Subject: [PATCH] gprof: Fix strchr discarded qualifier call In annotate_source strrchr is called on a const char *. So the result should also be stored in a const char *. * gprof/source.c (annotate_source): Make name_only a const char *. --- gprof/source.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gprof/source.c b/gprof/source.c index 860c0b5fec0..4aa7504e8df 100644 --- a/gprof/source.c +++ b/gprof/source.c @@ -98,7 +98,8 @@ annotate_source (Source_File *sf, unsigned int max_width, bool new_line; char buf[8192]; char *fname; - char *annotation, *name_only; + char *annotation; + const char *name_only; FILE *ifp, *ofp; Search_List_Elem *sle = src_search_list.head;