This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb/binutils-2_28-branch] RISC-V: Avoid a const warning
- From: Palmer Dabbelt <palmer at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 4 Apr 2017 15:27:04 -0000
- Subject: [binutils-gdb/binutils-2_28-branch] RISC-V: Avoid a const warning
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=bb580b80d725957409456677088504a95f26933d
commit bb580b80d725957409456677088504a95f26933d
Author: Palmer Dabbelt <palmer@dabbelt.com>
Date: Mon Apr 3 09:03:57 2017 -0700
RISC-V: Avoid a const warning
2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
* config/tc-riscv.c (riscv_clear_subsets): Cast argument to free to
avoid const warnings.
Diff:
---
gas/ChangeLog | 5 +++++
gas/config/tc-riscv.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 795c7dc..d6ab8a1 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
+
+ * config/tc-riscv.c (riscv_clear_subsets): Cast argument to free to
+ avoid const warnings.
+
2017-03-30 Palmer Dabbelt <palmer@dabbelt.com>
* config/tc-riscv.c (riscv_clear_subsets): New function.
diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c
index 6490b1a..88457c6 100644
--- a/gas/config/tc-riscv.c
+++ b/gas/config/tc-riscv.c
@@ -126,7 +126,7 @@ riscv_clear_subsets (void)
while (riscv_subsets != NULL)
{
struct riscv_subset *next = riscv_subsets->next;
- free (riscv_subsets->name);
+ free ((void *) riscv_subsets->name);
free (riscv_subsets);
riscv_subsets = next;
}