From ccd40a69325b28139a4d03873ee15e19e8901895 Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Fri, 28 Jun 2019 18:41:09 +0000 Subject: [PATCH] [Darwin] Fix a couple of Wformat-diag build warnings. 2019-06-28 Iain Sandoe * 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 | 7 +++++++ gcc/config/darwin-c.c | 2 +- gcc/config/darwin-driver.c | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9cc900d2f1d..64714b15784 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2019-06-28 Iain Sandoe + + * 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 * config/i386/sse.md (vgf2p8affineinvqb_, diff --git a/gcc/config/darwin-c.c b/gcc/config/darwin-c.c index aa5d2f20b1e..55b60da2511 100644 --- a/gcc/config/darwin-c.c +++ b/gcc/config/darwin-c.c @@ -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. */ diff --git a/gcc/config/darwin-driver.c b/gcc/config/darwin-driver.c index 3d85f29cb3d..49716fabf2d 100644 --- a/gcc/config/darwin-driver.c +++ b/gcc/config/darwin-driver.c @@ -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 %\n", + warning (0, "%qs is not valid for %", (*decoded_options)[i].arg); else if (vers_string == (*decoded_options)[i].arg) vers_string = xstrndup ((*decoded_options)[i].arg, 32); -- 2.30.2