https://gcc.gnu.org/g:46eb34a75a9d004ce776bba382fe8af0978cace7

commit r14-9730-g46eb34a75a9d004ce776bba382fe8af0978cace7
Author: Pan Li <pan2...@intel.com>
Date:   Sat Mar 30 21:32:06 2024 +0800

    RISC-V: Fix one unused varable in riscv_subset_list::parse
    
    This patch would like to fix one unused variable as below:
    
    ../../gcc/common/config/riscv/riscv-common.cc: In static member function
    'static riscv_subset_list* riscv_subset_list::parse(const char*, 
location_t)':
    ../../gcc/common/config/riscv/riscv-common.cc:1501:19: error: unused 
variable 'itr'
      [-Werror=unused-variable]
     1501 |   riscv_subset_t *itr;
    
    The variable consume code was removed but missed the var itself in
    previous.  Thus, we have unused variable here.
    
    gcc/ChangeLog:
    
            * common/config/riscv/riscv-common.cc (riscv_subset_list::parse):
            Remove unused var decl.
    
    Signed-off-by: Pan Li <pan2...@intel.com>

Diff:
---
 gcc/common/config/riscv/riscv-common.cc | 1 -
 1 file changed, 1 deletion(-)

diff --git a/gcc/common/config/riscv/riscv-common.cc 
b/gcc/common/config/riscv/riscv-common.cc
index 7095f303cbb..43b7549e3ec 100644
--- a/gcc/common/config/riscv/riscv-common.cc
+++ b/gcc/common/config/riscv/riscv-common.cc
@@ -1498,7 +1498,6 @@ riscv_subset_list::parse (const char *arch, location_t 
loc)
     return NULL;
 
   riscv_subset_list *subset_list = new riscv_subset_list (arch, loc);
-  riscv_subset_t *itr;
   const char *p = arch;
   p = subset_list->parse_base_ext (p);
   if (p == NULL)

Reply via email to