[binutils-gdb/binutils-2_46-branch] bfd: fix 2 more -Wdiscarded-qualifiers errors
Sam James via Binutils-cvs <[email protected]>
| Newsgroups | gmane.comp.gnu.binutils.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=3e4fd1a57eca51019d6ba6dd40751e3a8a7ac5d8 commit 3e4fd1a57eca51019d6ba6dd40751e3a8a7ac5d8 Author: Simon Marchi <[email protected]> Date: Mon Feb 23 08:26:36 2026 -0500 bfd: fix 2 more -Wdiscarded-qualifiers errors Change-Id: I047cd848506fc4d3dafdb901e300fe22430dddde (cherry picked from commit b3679b82926dd525e17a9b48114e96e95f0f6444) Diff: --- bfd/elf32-arc.c | 2 +- bfd/vms-misc.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c index bdf96de7668..7753872e198 100644 --- a/bfd/elf32-arc.c +++ b/bfd/elf32-arc.c @@ -556,7 +556,7 @@ arc_extract_features (const char *p) for (i = 0; i < ARRAY_SIZE (bfd_feature_list); i++) { - char *t = strstr (p, bfd_feature_list[i].attr); + const char *t = strstr (p, bfd_feature_list[i].attr); unsigned l = strlen (bfd_feature_list[i].attr); if ((t != NULL) && (t[l] == ',' diff --git a/bfd/vms-misc.c b/bfd/vms-misc.c index 63f627b18ed..a3e9ad9bb13 100644 --- a/bfd/vms-misc.c +++ b/bfd/vms-misc.c @@ -499,7 +499,7 @@ char * vms_get_module_name (const char *filename, bool upcase) { char *fname, *fptr; - const char *fout; + const char *fout, *fslash; /* Strip VMS path. */ fout = strrchr (filename, ']'); @@ -511,9 +511,9 @@ vms_get_module_name (const char *filename, bool upcase) fout = filename; /* Strip UNIX path. */ - fptr = strrchr (fout, '/'); - if (fptr != NULL) - fout = fptr + 1; + fslash = strrchr (fout, '/'); + if (fslash != NULL) + fout = fslash + 1; fname = strdup (fout);