]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
riscv: Fix warning in riscv_regno_ok_for_index_p
authorChristoph Müllner <christoph.muellner@vrull.eu>
Mon, 17 Jul 2023 08:59:15 +0000 (10:59 +0200)
committerKito Cheng <kito.cheng@sifive.com>
Mon, 17 Jul 2023 09:31:30 +0000 (17:31 +0800)
The variable `regno` is currently not used in riscv_regno_ok_for_index_p(),
which triggers a compiler warning. Let's address this.

Fixes: 423604278ed5 ("riscv: Prepare backend for index registers")
Reported-by: Juzhe Zhong <juzhe.zhong@rivai.ai>
Reported-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
gcc/ChangeLog:

* config/riscv/riscv.cc (riscv_regno_ok_for_index_p):
Remove parameter name from declaration of unused parameter.

Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
gcc/config/riscv/riscv.cc

index 6ed735d69832585087b29a4007acc907537e9696..ae3c034e76e6fa2456e3e00494e57040f92b088d 100644 (file)
@@ -861,7 +861,7 @@ riscv_index_reg_class ()
    but extensions might support that.  */
 
 int
-riscv_regno_ok_for_index_p (int regno)
+riscv_regno_ok_for_index_p (int)
 {
   return 0;
 }