summaryrefslogtreecommitdiff
path: root/apt-pkg/deb
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2020-05-24 16:36:03 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2020-05-25 12:05:00 +0200
commitc3bfdbfa3ae868515a67142d2df6200a3cb34d35 (patch)
tree241c4d6c2ddd3a4224cd5040537f47b6babb8149 /apt-pkg/deb
parent90a7a5e32643a67f4245460e7659d9dee230e9e7 (diff)
Silence clang warning -Wstring-plus-int
../apt-pkg/init.cc:137:39: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int] Cnf.CndSet("Dir::State", STATE_DIR + 1); ../apt-pkg/init.cc:137:39: note: use array indexing to silence this warning We have a few instances of that & it should be reasonably clear that we are not actually trying to append here, but ignoring or silencing this warning with an override is far more costly than just using what clang suggests here. Reported-By: clang Gbp-Dch: Ignore
Diffstat (limited to 'apt-pkg/deb')
-rw-r--r--apt-pkg/deb/debsystem.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/deb/debsystem.cc b/apt-pkg/deb/debsystem.cc
index 6904879b6..7d4bf7213 100644
--- a/apt-pkg/deb/debsystem.cc
+++ b/apt-pkg/deb/debsystem.cc
@@ -270,7 +270,7 @@ static std::string getDpkgStatusLocation(Configuration const &Cnf) {
Configuration PathCnf;
PathCnf.Set("Dir", Cnf.Find("Dir", "/"));
PathCnf.Set("Dir::State::status", "status");
- auto const cnfstatedir = Cnf.Find("Dir::State", STATE_DIR + 1);
+ auto const cnfstatedir = Cnf.Find("Dir::State", &STATE_DIR[1]);
// if the state dir ends in apt, replace it with dpkg -
// for the default this gives us the same as the fallback below.
// This can't be a ../dpkg as that would play bad with symlinks