Skip to content

Commit d3f1d87

Browse files
committed
Remove unused variable warning in RISC-V codegen
This removes unused 'func_t *func' declaration in code_generate function that was causing compiler warnings. The variable is not needed as 'func' is only used in emit_ph2_ir() where it has its own local declaration.
1 parent bd0947a commit d3f1d87

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/riscv-codegen.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,6 @@ void code_generate(void)
446446
elf_data_start = elf_code_start + elf_offset;
447447
elf_rodata_start = elf_data_start + elf_data->size;
448448
elf_bss_start = elf_rodata_start + elf_rodata->size;
449-
func_t *func;
450449

451450
/* start: save original sp in s0; allocate global stack; run init */
452451
emit(__addi(__s0, __sp, 0));

0 commit comments

Comments
 (0)