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 --- libbrep/build.cxx | 4 ++-- libbrep/common.cxx | 2 +- libbrep/package.cxx | 14 +++++++------- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'libbrep') diff --git a/libbrep/build.cxx b/libbrep/build.cxx index 03775c4..c095b32 100644 --- a/libbrep/build.cxx +++ b/libbrep/build.cxx @@ -24,7 +24,7 @@ namespace brep { if (s == "building") return build_state::building; else if (s == "built") return build_state::built; - else throw invalid_argument ("invalid build state '" + s + "'"); + else throw invalid_argument ("invalid build state '" + s + '\''); } // force_state @@ -48,7 +48,7 @@ namespace brep if (s == "unforced") return force_state::unforced; else if (s == "forcing") return force_state::forcing; else if (s == "forced") return force_state::forced; - else throw invalid_argument ("invalid force state '" + s + "'"); + else throw invalid_argument ("invalid force state '" + s + '\''); } // build diff --git a/libbrep/common.cxx b/libbrep/common.cxx index 8964e0a..4f729a3 100644 --- a/libbrep/common.cxx +++ b/libbrep/common.cxx @@ -30,6 +30,6 @@ namespace brep else if (r == "test") return unbuildable_reason::test; else if (r == "external") return unbuildable_reason::external; else if (r == "unbuildable") return unbuildable_reason::unbuildable; - else throw invalid_argument ("invalid unbuildable reason '" + r + "'"); + else throw invalid_argument ("invalid unbuildable reason '" + r + '\''); } } diff --git a/libbrep/package.cxx b/libbrep/package.cxx index 65fa1ba..5f99fbb 100644 --- a/libbrep/package.cxx +++ b/libbrep/package.cxx @@ -161,11 +161,11 @@ namespace brep // Probably drop-box would be better as also tells what are // the available internal repositories. // - string k (project.string () + " " + name.string () + " " + - version.string () + " " + version.string (true)); + string k (project.string () + ' ' + name.string () + ' ' + + version.string () + ' ' + version.string (true)); if (upstream_version) - k += " " + *upstream_version; + k += ' ' + *upstream_version; // Add licenses to search keywords. // @@ -173,13 +173,13 @@ namespace brep { for (const auto& l: la) { - k += " " + l; + k += ' ' + l; // If license is say LGPLv2 then LGPL is also a search keyword. // size_t n (l.size ()); if (n > 2 && l[n - 2] == 'v' && l[n - 1] >= '0' && l[n - 1] <= '9') - k += " " + string (l, 0, n - 2); + k += ' ' + string (l, 0, n - 2); } } @@ -190,12 +190,12 @@ namespace brep // Add topics to the second-strongest search keywords. // for (const auto& t: topics) - k2 += " " + t; + k2 += ' ' + t; // Add keywords to the second-strongest search keywords. // for (const auto& k: keywords) - k2 += " " + k; + k2 += ' ' + k; return {move (k), move (k2), description ? *description : "", changes}; } -- cgit v1.1