* [commit] MIPS: Add ATTRIBUTE_UNUSED to mips_start_function_definition
@ 2024-01-11 9:59 YunQiang Su
2024-01-15 21:05 ` rep.dot.nop
0 siblings, 1 reply; 2+ messages in thread
From: YunQiang Su @ 2024-01-11 9:59 UTC (permalink / raw)
To: gcc-patches; +Cc: YunQiang Su
Fix build warning:
mips.cc: warning: unused parameter 'decl'.
gcc
* config/mips/mips.cc (mips_start_function_definition):
Add ATTRIBUTE_UNUSED.
---
gcc/config/mips/mips.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gcc/config/mips/mips.cc b/gcc/config/mips/mips.cc
index 60b336e43d0..e752019b5e2 100644
--- a/gcc/config/mips/mips.cc
+++ b/gcc/config/mips/mips.cc
@@ -7330,7 +7330,8 @@ mips_start_unique_function (const char *name)
function contains MIPS16 code. */
static void
-mips_start_function_definition (const char *name, bool mips16_p, tree decl)
+mips_start_function_definition (const char *name, bool mips16_p,
+ tree decl ATTRIBUTE_UNUSED)
{
if (mips16_p)
fprintf (asm_out_file, "\t.set\tmips16\n");
--
2.39.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [commit] MIPS: Add ATTRIBUTE_UNUSED to mips_start_function_definition
2024-01-11 9:59 [commit] MIPS: Add ATTRIBUTE_UNUSED to mips_start_function_definition YunQiang Su
@ 2024-01-15 21:05 ` rep.dot.nop
0 siblings, 0 replies; 2+ messages in thread
From: rep.dot.nop @ 2024-01-15 21:05 UTC (permalink / raw)
To: gcc-patches, YunQiang Su
On 11 January 2024 10:59:21 CET, YunQiang Su <syq@gcc.gnu.org> wrote:
>Fix build warning:
> mips.cc: warning: unused parameter 'decl'.
>
>gcc
> * config/mips/mips.cc (mips_start_function_definition):
> Add ATTRIBUTE_UNUSED.
>---
> gcc/config/mips/mips.cc | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
>diff --git a/gcc/config/mips/mips.cc b/gcc/config/mips/mips.cc
>index 60b336e43d0..e752019b5e2 100644
>--- a/gcc/config/mips/mips.cc
>+++ b/gcc/config/mips/mips.cc
>@@ -7330,7 +7330,8 @@ mips_start_unique_function (const char *name)
> function contains MIPS16 code. */
>
> static void
>-mips_start_function_definition (const char *name, bool mips16_p, tree decl)
>+mips_start_function_definition (const char *name, bool mips16_p,
>+ tree decl ATTRIBUTE_UNUSED)
Nowadays in C++ you can just remove the identifier name:
+mips_start_function_definition (const char *name, bool mips16_p, tree)
> {
> if (mips16_p)
> fprintf (asm_out_file, "\t.set\tmips16\n");
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-15 21:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-11 9:59 [commit] MIPS: Add ATTRIBUTE_UNUSED to mips_start_function_definition YunQiang Su
2024-01-15 21:05 ` rep.dot.nop
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).