From 5bf2dd09110f257acc730eab71301e1dede1c710 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 27 Oct 2022 16:32:08 +0200 Subject: Suppress (potential) bogus GCC 12 -Wrestrict warnings --- mod/database.cxx | 2 +- mod/external-handler.cxx | 2 +- mod/mod-build-log.cxx | 2 +- mod/mod-build-task.cxx | 2 +- mod/mod-ci.cxx | 2 +- mod/mod-package-version-details.cxx | 6 +++--- mod/mod-repository-details.cxx | 2 +- mod/mod-submit.cxx | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) (limited to 'mod') diff --git a/mod/database.cxx b/mod/database.cxx index d53ee50..c88555a 100644 --- a/mod/database.cxx +++ b/mod/database.cxx @@ -59,7 +59,7 @@ namespace brep // Change the connection current user to the execution user name. // if (!role_.empty ()) - conn->execute ("SET ROLE '" + role_ + "'"); + conn->execute ("SET ROLE '" + role_ + '\''); return conn; } diff --git a/mod/external-handler.cxx b/mod/external-handler.cxx index cdf3f71..dc4c0fd 100644 --- a/mod/external-handler.cxx +++ b/mod/external-handler.cxx @@ -316,7 +316,7 @@ namespace brep assert (e != nullptr); if (!(*e == '\0' && c >= 100 && c < 600)) - bad_value ("invalid HTTP status '" + v + "'"); + bad_value ("invalid HTTP status '" + v + '\''); // Save the HTTP status. // diff --git a/mod/mod-build-log.cxx b/mod/mod-build-log.cxx index 948c9c3..328d178 100644 --- a/mod/mod-build-log.cxx +++ b/mod/mod-build-log.cxx @@ -196,7 +196,7 @@ handle (request& rq, response& rs) auto config_expired = [&trace, &lpath, this] (const string& d) { l2 ([&]{trace << "package build configuration for " << lpath - << (!tenant.empty () ? "(" + tenant + ")" : "") + << (!tenant.empty () ? '(' + tenant + ')' : "") << " expired: " << d;}); throw invalid_request (404, "package build configuration expired: " + d); diff --git a/mod/mod-build-task.cxx b/mod/mod-build-task.cxx index 137cf6a..5ba6d06 100644 --- a/mod/mod-build-task.cxx +++ b/mod/mod-build-task.cxx @@ -534,7 +534,7 @@ handle (request& rq, response& rs) } if (!lc) - throw invalid_request (400, "unable to match login info '" + l + "'"); + throw invalid_request (400, "unable to match login info '" + l + '\''); tqm.interactive_login = move (lc); } diff --git a/mod/mod-ci.cxx b/mod/mod-ci.cxx index ac69941..68bb9be 100644 --- a/mod/mod-ci.cxx +++ b/mod/mod-ci.cxx @@ -653,7 +653,7 @@ handle (request& rq, response& rs) }, 2 /* stderr */, options_->email (), - "CI request submission (" + request_id + ")", + "CI request submission (" + request_id + ')', {options_->ci_email ()}); // Write the CI request manifest. diff --git a/mod/mod-package-version-details.cxx b/mod/mod-package-version-details.cxx index 8ea0b01..37eb3c6 100644 --- a/mod/mod-package-version-details.cxx +++ b/mod/mod-package-version-details.cxx @@ -152,7 +152,7 @@ handle (request& rq, response& rs) const string& name (pkg->name.string ()); - const string title (name + " " + sver); + const string title (name + ' ' + sver); xml::serializer s (rs.content (), title); s << HTML @@ -220,7 +220,7 @@ handle (request& rq, response& rs) { assert (pkg->location); - s << TR_LINK (rl.url ().string () + "/" + pkg->location->string (), + s << TR_LINK (rl.url ().string () + '/' + pkg->location->string (), pkg->location->leaf ().string (), "download"); } @@ -292,7 +292,7 @@ handle (request& rq, response& rs) if (dcon) s << ' ' - << A(HREF=u + "/" + p->version.string ()) << *dcon << ~A; + << A(HREF=u + '/' + p->version.string ()) << *dcon << ~A; } else if (p->internal ()) { diff --git a/mod/mod-repository-details.cxx b/mod/mod-repository-details.cxx index ce7582e..1cbb5cb 100644 --- a/mod/mod-repository-details.cxx +++ b/mod/mod-repository-details.cxx @@ -100,7 +100,7 @@ handle (request& rq, response& rs) // string id (html_id (r.canonical_name)); s << H1(ID=id) - << A(HREF="#" + web::mime_url_encode (id, false)) + << A(HREF='#' + web::mime_url_encode (id, false)) << r.display_name << ~A << ~H1; diff --git a/mod/mod-submit.cxx b/mod/mod-submit.cxx index 2ad8661..b73c96e 100644 --- a/mod/mod-submit.cxx +++ b/mod/mod-submit.cxx @@ -683,7 +683,7 @@ handle (request& rq, response& rs) sendmail sm (print_args, 2 /* stderr */, options_->email (), - "new package submission " + a.string () + " (" + ref + ")", + "new package submission " + a.string () + " (" + ref + ')', {options_->submit_email ()}); // Write the submission request manifest. -- cgit v1.1