* [PATCH] riscv: Fix warning in riscv_regno_ok_for_index_p
@ 2023-07-17 8:59 Christoph Muellner
2023-07-17 9:32 ` Kito Cheng
0 siblings, 1 reply; 2+ messages in thread
From: Christoph Muellner @ 2023-07-17 8:59 UTC (permalink / raw)
To: gcc-patches, Kito Cheng, Jeff Law, Jim Wilson, Palmer Dabbelt,
Andrew Waterman, Philipp Tomsich, JuzheZhong, Andreas Schwab,
Andrew Pinski
Cc: Christoph Müllner
From: Christoph Müllner <christoph.muellner@vrull.eu>
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 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc
index 6ed735d6983..ae3c034e76e 100644
--- a/gcc/config/riscv/riscv.cc
+++ b/gcc/config/riscv/riscv.cc
@@ -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;
}
--
2.41.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] riscv: Fix warning in riscv_regno_ok_for_index_p
2023-07-17 8:59 [PATCH] riscv: Fix warning in riscv_regno_ok_for_index_p Christoph Muellner
@ 2023-07-17 9:32 ` Kito Cheng
0 siblings, 0 replies; 2+ messages in thread
From: Kito Cheng @ 2023-07-17 9:32 UTC (permalink / raw)
To: Christoph Muellner
Cc: gcc-patches, Jeff Law, Jim Wilson, Palmer Dabbelt,
Andrew Waterman, Philipp Tomsich, JuzheZhong, Andreas Schwab,
Andrew Pinski
pushed, thanks :)
On Mon, Jul 17, 2023 at 4:59 PM Christoph Muellner
<christoph.muellner@vrull.eu> wrote:
>
> From: Christoph Müllner <christoph.muellner@vrull.eu>
>
> 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 | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc
> index 6ed735d6983..ae3c034e76e 100644
> --- a/gcc/config/riscv/riscv.cc
> +++ b/gcc/config/riscv/riscv.cc
> @@ -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;
> }
> --
> 2.41.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-17 9:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-17 8:59 [PATCH] riscv: Fix warning in riscv_regno_ok_for_index_p Christoph Muellner
2023-07-17 9:32 ` Kito Cheng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).