This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] RISC-V: Avoid a const warning


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c41cf6fdf514fce6b69f8f875b6903b2a3910f89

commit c41cf6fdf514fce6b69f8f875b6903b2a3910f89
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 169b2ff..557b43c 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 2830ba1..0a9817a 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;
     }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]