public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Martin Liska <marxin@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/users/marxin/heads/Wformat-diag-targets-part-2)] v850: fix -Wformat-diag warnings.
Date: Tue, 18 Jan 2022 13:47:03 +0000 (GMT)	[thread overview]
Message-ID: <20220118134703.60FC43857C5E@sourceware.org> (raw)

https://gcc.gnu.org/g:907e7288eaa3f4b74bbe943ca0d902fddf654d5f

commit 907e7288eaa3f4b74bbe943ca0d902fddf654d5f
Author: Martin Liska <mliska@suse.cz>
Date:   Tue Jan 18 14:30:30 2022 +0100

    v850: fix -Wformat-diag warnings.
    
    gcc/ChangeLog:
    
            * config/v850/v850-c.cc (pop_data_area): Fix -Wformat-diag
            warning.
            (ghs_pragma_section): Likewise.
            (ghs_pragma_interrupt): Likewise.
            (ghs_pragma_starttda): Likewise.
            (ghs_pragma_startsda): Likewise.
            (ghs_pragma_startzda): Likewise.
            (ghs_pragma_endtda): Likewise.
            (ghs_pragma_endsda): Likewise.
            (ghs_pragma_endzda): Likewise.

Diff:
---
 gcc/config/v850/v850-c.cc | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/gcc/config/v850/v850-c.cc b/gcc/config/v850/v850-c.cc
index 0ff0e8c6430..45a3a0d811f 100644
--- a/gcc/config/v850/v850-c.cc
+++ b/gcc/config/v850/v850-c.cc
@@ -64,10 +64,10 @@ static int
 pop_data_area (v850_data_area data_area)
 {
   if (data_area_stack == NULL)
-    warning (OPT_Wpragmas, "#pragma GHS endXXXX found without "
+    warning (OPT_Wpragmas, "%<#pragma%> GHS endXXXX found without "
 	     "previous startXXX");
   else if (data_area != data_area_stack->data_area)
-    warning (OPT_Wpragmas, "#pragma GHS endXXX does not match "
+    warning (OPT_Wpragmas, "%<#pragma%> GHS endXXX does not match "
 	     "previous startXXX");
   else
     {
@@ -150,7 +150,7 @@ ghs_pragma_section (cpp_reader * pfile ATTRIBUTE_UNUSED)
       if (type == CPP_COMMA)
 	repeat = 1;
       else if (type != CPP_EOF)
-	warning (OPT_Wpragmas, "junk at end of #pragma ghs section");
+	warning (OPT_Wpragmas, "junk at end of %<#pragma%> ghs section");
       
       if      (streq (sect, "data"))    kind = GHS_SECTION_KIND_DATA;
       else if (streq (sect, "text"))    kind = GHS_SECTION_KIND_TEXT;
@@ -181,7 +181,7 @@ ghs_pragma_section (cpp_reader * pfile ATTRIBUTE_UNUSED)
   return;
 
  bad:
-  warning (OPT_Wpragmas, "malformed #pragma ghs section");
+  warning (OPT_Wpragmas, "malformed %<#pragma%> ghs section");
   return;
 
  reset:
@@ -200,7 +200,7 @@ ghs_pragma_interrupt (cpp_reader * pfile ATTRIBUTE_UNUSED)
   tree x;
   
   if (pragma_lex (&x) != CPP_EOF)
-    warning (OPT_Wpragmas, "junk at end of #pragma ghs interrupt");
+    warning (OPT_Wpragmas, "junk at end of %<#pragma%> ghs interrupt");
   
   mark_current_function_as_interrupt ();
 }
@@ -211,7 +211,7 @@ ghs_pragma_starttda (cpp_reader * pfile ATTRIBUTE_UNUSED)
   tree x;
   
   if (pragma_lex (&x) != CPP_EOF)
-    warning (OPT_Wpragmas, "junk at end of #pragma ghs starttda");
+    warning (OPT_Wpragmas, "junk at end of %<#pragma%> ghs starttda");
   
   push_data_area (DATA_AREA_TDA);
 }
@@ -222,7 +222,7 @@ ghs_pragma_startsda (cpp_reader * pfile ATTRIBUTE_UNUSED)
   tree x;
   
   if (pragma_lex (&x) != CPP_EOF)
-    warning (OPT_Wpragmas, "junk at end of #pragma ghs startsda");
+    warning (OPT_Wpragmas, "junk at end of %<#pragma%> ghs startsda");
   
   push_data_area (DATA_AREA_SDA);
 }
@@ -233,7 +233,7 @@ ghs_pragma_startzda (cpp_reader * pfile ATTRIBUTE_UNUSED)
   tree x;
   
   if (pragma_lex (&x) != CPP_EOF)
-    warning (OPT_Wpragmas, "junk at end of #pragma ghs startzda");
+    warning (OPT_Wpragmas, "junk at end of %<#pragma%> ghs startzda");
   
   push_data_area (DATA_AREA_ZDA);
 }
@@ -244,7 +244,7 @@ ghs_pragma_endtda (cpp_reader * pfile ATTRIBUTE_UNUSED)
   tree x;
   
   if (pragma_lex (&x) != CPP_EOF)
-    warning (OPT_Wpragmas, "junk at end of #pragma ghs endtda");
+    warning (OPT_Wpragmas, "junk at end of %<#pragma%> ghs endtda");
   
   pop_data_area (DATA_AREA_TDA);
 }
@@ -255,7 +255,7 @@ ghs_pragma_endsda (cpp_reader * pfile ATTRIBUTE_UNUSED)
   tree x;
   
   if (pragma_lex (&x) != CPP_EOF)
-    warning (OPT_Wpragmas, "junk at end of #pragma ghs endsda");
+    warning (OPT_Wpragmas, "junk at end of %<#pragma%> ghs endsda");
   
   pop_data_area (DATA_AREA_SDA);
 }
@@ -266,7 +266,7 @@ ghs_pragma_endzda (cpp_reader * pfile ATTRIBUTE_UNUSED)
   tree x;
   
   if (pragma_lex (&x) != CPP_EOF)
-    warning (OPT_Wpragmas, "junk at end of #pragma ghs endzda");
+    warning (OPT_Wpragmas, "junk at end of %<#pragma%> ghs endzda");
   
   pop_data_area (DATA_AREA_ZDA);
 }


             reply	other threads:[~2022-01-18 13:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-18 13:47 Martin Liska [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-01-18 13:32 Martin Liska

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220118134703.60FC43857C5E@sourceware.org \
    --to=marxin@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).