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 *.
This commit is contained in:
Mark Wielaard 2026-05-02 18:56:51 +02:00 committed by H.J. Lu
parent 34ca322d8a
commit b8d39fd810

View file

@ -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;