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.
This commit is contained in:
Palmer Dabbelt 2017-04-03 09:03:57 -07:00
parent 2f5f29cada
commit c41cf6fdf5
2 changed files with 6 additions and 1 deletions

View File

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

View File

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