public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] RISC-V: Eliminate unused parameter warning.
@ 2023-11-08  9:09 Li Xu
  2023-11-08  9:10 ` juzhe.zhong
  0 siblings, 1 reply; 2+ messages in thread
From: Li Xu @ 2023-11-08  9:09 UTC (permalink / raw)
  To: gcc-patches; +Cc: kito.cheng, palmer, juzhe.zhong, xuli

From: xuli <xuli1@eswincomputing.com>

The parameter orig_fndecl is not used, use anonymous parameters instead.

../.././gcc/gcc/config/riscv/riscv-c.cc: In function ‘bool riscv_check_builtin_call(location_t, vec<unsigned int>, tree, tree, unsigned int, tree_node**)’:
../.././gcc/gcc/config/riscv/riscv-c.cc:207:11: warning: unused parameter ‘orig_fndecl’ [-Wunused-parameter]
      tree orig_fndecl, unsigned int nargs, tree *args)
           ^~~~~~~~~~~

gcc/ChangeLog:

	* config/riscv/riscv-c.cc (riscv_check_builtin_call): Eliminate warning.
---
 gcc/config/riscv/riscv-c.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/config/riscv/riscv-c.cc b/gcc/config/riscv/riscv-c.cc
index bedf7217390..b7f9ba204f7 100644
--- a/gcc/config/riscv/riscv-c.cc
+++ b/gcc/config/riscv/riscv-c.cc
@@ -204,7 +204,7 @@ riscv_pragma_intrinsic (cpp_reader *)
 /* Implement TARGET_CHECK_BUILTIN_CALL.  */
 static bool
 riscv_check_builtin_call (location_t loc, vec<location_t> arg_loc, tree fndecl,
-			  tree orig_fndecl, unsigned int nargs, tree *args)
+			  tree, unsigned int nargs, tree *args)
 {
   unsigned int code = DECL_MD_FUNCTION_CODE (fndecl);
   unsigned int subcode = code >> RISCV_BUILTIN_SHIFT;
-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] RISC-V: Eliminate unused parameter warning.
  2023-11-08  9:09 [PATCH] RISC-V: Eliminate unused parameter warning Li Xu
@ 2023-11-08  9:10 ` juzhe.zhong
  0 siblings, 0 replies; 2+ messages in thread
From: juzhe.zhong @ 2023-11-08  9:10 UTC (permalink / raw)
  To: Li Xu, gcc-patches; +Cc: kito.cheng, palmer, Li Xu

[-- Attachment #1: Type: text/plain, Size: 1467 bytes --]

OK



juzhe.zhong@rivai.ai
 
From: Li Xu
Date: 2023-11-08 17:09
To: gcc-patches
CC: kito.cheng; palmer; juzhe.zhong; xuli
Subject: [PATCH] RISC-V: Eliminate unused parameter warning.
From: xuli <xuli1@eswincomputing.com>
 
The parameter orig_fndecl is not used, use anonymous parameters instead.
 
../.././gcc/gcc/config/riscv/riscv-c.cc: In function ‘bool riscv_check_builtin_call(location_t, vec<unsigned int>, tree, tree, unsigned int, tree_node**)’:
../.././gcc/gcc/config/riscv/riscv-c.cc:207:11: warning: unused parameter ‘orig_fndecl’ [-Wunused-parameter]
      tree orig_fndecl, unsigned int nargs, tree *args)
           ^~~~~~~~~~~
 
gcc/ChangeLog:
 
* config/riscv/riscv-c.cc (riscv_check_builtin_call): Eliminate warning.
---
gcc/config/riscv/riscv-c.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
 
diff --git a/gcc/config/riscv/riscv-c.cc b/gcc/config/riscv/riscv-c.cc
index bedf7217390..b7f9ba204f7 100644
--- a/gcc/config/riscv/riscv-c.cc
+++ b/gcc/config/riscv/riscv-c.cc
@@ -204,7 +204,7 @@ riscv_pragma_intrinsic (cpp_reader *)
/* Implement TARGET_CHECK_BUILTIN_CALL.  */
static bool
riscv_check_builtin_call (location_t loc, vec<location_t> arg_loc, tree fndecl,
-   tree orig_fndecl, unsigned int nargs, tree *args)
+   tree, unsigned int nargs, tree *args)
{
   unsigned int code = DECL_MD_FUNCTION_CODE (fndecl);
   unsigned int subcode = code >> RISCV_BUILTIN_SHIFT;
-- 
2.17.1
 
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-11-08  9:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-08  9:09 [PATCH] RISC-V: Eliminate unused parameter warning Li Xu
2023-11-08  9:10 ` juzhe.zhong

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