From a9aad52ac7134edd89869529e7df3b1e6316c10b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 27 Oct 2022 16:12:13 +0200 Subject: Suppress (potential) bogus GCC 12 -Wrestrict warnings --- bdep/database.cxx | 2 +- bdep/git.cxx | 2 +- bdep/http-service.cxx | 8 ++++---- bdep/new-parsers.cxx | 2 +- bdep/publish.cxx | 4 ++-- bdep/sync.cxx | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bdep/database.cxx b/bdep/database.cxx index 202e1d7..e41b349 100644 --- a/bdep/database.cxx +++ b/bdep/database.cxx @@ -110,7 +110,7 @@ namespace bdep set_nocase ("relative_path"); db.execute ("UPDATE sqlite_master" - " SET sql = '" + t.sql + "'" + " SET sql = '" + t.sql + '\'' " WHERE " + where); db.execute ("PRAGMA writable_schema = OFF"); diff --git a/bdep/git.cxx b/bdep/git.cxx index ed9d23d..cc697b3 100644 --- a/bdep/git.cxx +++ b/bdep/git.cxx @@ -135,7 +135,7 @@ namespace bdep ep = "--exec-path=" + d.string (); l4 ([&]{trace << (system ? "system: '" : "bundled: '") << pp.effect - << "'" << (ep ? " " + *ep : "");}); + << "'" << (ep ? ' ' + *ep : "");}); #endif git = make_pair (move (pp), move (ep)); diff --git a/bdep/http-service.cxx b/bdep/http-service.cxx index c3ddc5c..68c2e4d 100644 --- a/bdep/http-service.cxx +++ b/bdep/http-service.cxx @@ -110,7 +110,7 @@ namespace bdep fos.emplace_back ( p.type == parameter::file ? p.name + "=@" + p.value : p.type == parameter::file_text ? p.name + "=@-" : - p.name + "=" + p.value); + p.name + '=' + p.value); } // Note that it's a bad idea to issue the diagnostics while curl is @@ -266,7 +266,7 @@ namespace bdep return http_status {c, move (r)}; } - bad_response ("invalid HTTP response status line '" + l + "'"); + bad_response ("invalid HTTP response status line '" + l + '\''); assert (false); // Can't be here. return http_status {}; @@ -394,7 +394,7 @@ namespace bdep uint16_t c (status_code (v)); if (c == 0) - bad_value ("invalid HTTP status '" + v + "'"); + bad_value ("invalid HTTP status '" + v + '\''); if (c != rs.code) bad_value ("status " + v + " doesn't match HTTP response " @@ -450,7 +450,7 @@ namespace bdep message = "HTTP status code " + to_string (rs.code); if (!rs.reason.empty ()) - message += " (" + lcase (rs.reason) + ")"; + message += " (" + lcase (rs.reason) + ')'; } if (!location) diff --git a/bdep/new-parsers.cxx b/bdep/new-parsers.cxx index f6e03e8..a58139e 100644 --- a/bdep/new-parsers.cxx +++ b/bdep/new-parsers.cxx @@ -62,7 +62,7 @@ namespace bdep throw invalid_value (o, po, string (flag ? "missing" : "unexpected") + - " value for '" + po + "'"); + " value for '" + po + '\''); } os.push_back (move (po)); diff --git a/bdep/publish.cxx b/bdep/publish.cxx index 94cc284..9a6fcfd 100644 --- a/bdep/publish.cxx +++ b/bdep/publish.cxx @@ -307,8 +307,8 @@ namespace bdep run_b ( o, "dist:", - "'" + p.dist_dir.representation () + "'", - "config.dist.root='" + dr.representation () + "'", + '\'' + p.dist_dir.representation () + '\'', + "config.dist.root='" + dr.representation () + '\'', "config.dist.archives=tar.gz", "config.dist.checksums=sha256", (uncommitted && *uncommitted diff --git a/bdep/sync.cxx b/bdep/sync.cxx index 3722041..8140426 100644 --- a/bdep/sync.cxx +++ b/bdep/sync.cxx @@ -1806,7 +1806,7 @@ namespace bdep co, "--no-external-modules", o, - "'" + src.representation () + "'@'" + out.representation () + + '\'' + src.representation () + "'@'" + out.representation () + "',forward"); } } -- cgit v1.1