diff mbox series

[7/12] fix diagnostic quoting/spelling in libgcc

Message ID a3045a65-8f6a-970b-1de1-c140fd670bfc@gmail.com
State New
Headers show
Series detect quoting and punctuation problems in diagnostics | expand

Commit Message

Martin Sebor May 14, 2019, 9:32 p.m. UTC
The attached patch fixes quoting, spelling, and other formatting
issues in diagnostics issued from files in the libgcc directory
and pointed out by the -Wformat-diag warning.

Martin

Comments

Jeff Law May 16, 2019, 7:17 p.m. UTC | #1
On 5/14/19 3:32 PM, Martin Sebor wrote:
> The attached patch fixes quoting, spelling, and other formatting
> issues in diagnostics issued from files in the libgcc directory
> and pointed out by the -Wformat-diag warning.
> 
> Martin
> 
> gcc-wformat-diag-libgcc.diff
> 
> libgcc/ChangeLog:
> 
> 	* libgcov-util.c (read_gcda_file): Remove trailing newline.
OK
jeff
diff mbox series

Patch

libgcc/ChangeLog:

	* libgcov-util.c (read_gcda_file): Remove trailing newline.

diff --git a/libgcc/libgcov-util.c b/libgcc/libgcov-util.c
index ae0dd017204..62f4fe38233 100644
--- a/libgcc/libgcov-util.c
+++ b/libgcc/libgcov-util.c
@@ -332,7 +332,7 @@  read_gcda_file (const char *filename)
         {
           if (((mask & 0xff) != 0xff))
             {
-              warning (0, "%s:tag `%x' is invalid\n", filename, tag);
+              warning (0, "%s:tag %qx is invalid", filename, tag);
               break;
             }
           tag_depth--;
@@ -347,7 +347,7 @@  read_gcda_file (const char *filename)
           if (depth && depth < tag_depth)
             {
               if (!GCOV_TAG_IS_SUBTAG (tags[depth - 1], tag))
-                warning (0, "%s:tag `%x' is incorrectly nested\n",
+                warning (0, "%s:tag %qx is incorrectly nested",
                          filename, tag);
             }
           depth = tag_depth;
@@ -362,18 +362,18 @@  read_gcda_file (const char *filename)
 
           actual_length = gcov_position () - base;
           if (actual_length > length)
-            warning (0, "%s:record size mismatch %lu bytes overread\n",
+            warning (0, "%s:record size mismatch %lu bytes overread",
                      filename, actual_length - length);
           else if (length > actual_length)
-            warning (0, "%s:record size mismatch %lu bytes unread\n",
+            warning (0, "%s:record size mismatch %lu bytes unread",
                      filename, length - actual_length);
        }
 
       gcov_sync (base, length);
       if ((error = gcov_is_error ()))
         {
-          warning (0, error < 0 ? "%s:counter overflow at %lu\n" :
-                                  "%s:read error at %lu\n", filename,
+          warning (0, error < 0 ? "%s:counter overflow at %lu" :
+                                  "%s:read error at %lu", filename,
                    (long unsigned) gcov_position ());
           break;
         }