[Darwin] Fix a couple of Wformat-diag build warnings.
authorIain Sandoe <iain@sandoe.co.uk>
Fri, 28 Jun 2019 18:41:09 +0000 (18:41 +0000)
committerIain Sandoe <iains@gcc.gnu.org>
Fri, 28 Jun 2019 18:41:09 +0000 (18:41 +0000)
2019-06-28  Iain Sandoe  <iain@sandoe.co.uk>

* config/darwin-c.c (pop_field_alignment): Quote #pragma options.
* config/darwin-driver.c (darwin_default_min_version): Remove newline
from warning.
(darwin_driver_init): Likewise.

From-SVN: r272789

gcc/ChangeLog
gcc/config/darwin-c.c
gcc/config/darwin-driver.c

index 9cc900d2f1dc3d9686ba5bc04b357f689e648741..64714b1578468fb4f9ca709e9d5284c244505af5 100644 (file)
@@ -1,3 +1,10 @@
+2019-06-28  Iain Sandoe  <iain@sandoe.co.uk>
+
+       * config/darwin-c.c (pop_field_alignment): Quote #pragma options.
+       * config/darwin-driver.c (darwin_default_min_version): Remove newline
+       from warning.
+       (darwin_driver_init): Likewise.
+
 2019-06-28  Jan Beulich  <jbeulich@suse.com>
 
        * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
index aa5d2f20b1e723bf62c29c86db1f85c39d54d848..55b60da2511154f7eb9c95bcafb20585f22a834d 100644 (file)
@@ -79,7 +79,7 @@ pop_field_alignment (void)
       free (entry);
     }
   else
-    error ("too many #pragma options align=reset");
+    error ("too many %<#pragma options%> align=reset");
 }
 
 /* Handlers for Darwin-specific pragmas.  */
index 3d85f29cb3d89b673c33018d91145c11a2dc6dd3..49716fabf2d2bce215c09005fb59092561a5db35 100644 (file)
@@ -202,7 +202,7 @@ darwin_default_min_version (void)
       const char *checked = validate_macosx_version_min (new_flag);
       if (checked == NULL)
        {
-         warning (0, "couldn%'t understand version %s\n", new_flag);
+         warning (0, "couldn%'t understand version %s", new_flag);
          return NULL;
        }
       new_flag = xstrndup (checked, strlen (checked));
@@ -298,7 +298,7 @@ darwin_driver_init (unsigned int *decoded_options_count,
          vers_string =
            validate_macosx_version_min ((*decoded_options)[i].arg);
          if (vers_string == NULL)
-           warning (0, "%qs is not valid for %<mmacosx-version-min%>\n",
+           warning (0, "%qs is not valid for %<mmacosx-version-min%>",
                     (*decoded_options)[i].arg);
          else if (vers_string == (*decoded_options)[i].arg)
            vers_string = xstrndup ((*decoded_options)[i].arg, 32);