summaryrefslogtreecommitdiff
path: root/apt-pkg/init.cc
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/init.cc
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/init.cc')
-rw-r--r--apt-pkg/init.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc
index a619368ec..b9d9b15d2 100644
--- a/apt-pkg/init.cc
+++ b/apt-pkg/init.cc
@@ -134,18 +134,18 @@ bool pkgInitConfig(Configuration &Cnf)
Cnf.CndSet("Dir","/");
// State
- Cnf.CndSet("Dir::State", STATE_DIR + 1);
+ Cnf.CndSet("Dir::State", &STATE_DIR[1]);
Cnf.CndSet("Dir::State::lists","lists/");
Cnf.CndSet("Dir::State::cdroms","cdroms.list");
// Cache
- Cnf.CndSet("Dir::Cache", CACHE_DIR + 1);
+ Cnf.CndSet("Dir::Cache", &CACHE_DIR[1]);
Cnf.CndSet("Dir::Cache::archives","archives/");
Cnf.CndSet("Dir::Cache::srcpkgcache","srcpkgcache.bin");
Cnf.CndSet("Dir::Cache::pkgcache","pkgcache.bin");
// Configuration
- Cnf.CndSet("Dir::Etc", CONF_DIR + 1);
+ Cnf.CndSet("Dir::Etc", &CONF_DIR[1]);
Cnf.CndSet("Dir::Etc::sourcelist","sources.list");
Cnf.CndSet("Dir::Etc::sourceparts","sources.list.d");
Cnf.CndSet("Dir::Etc::main","apt.conf");
@@ -162,7 +162,7 @@ bool pkgInitConfig(Configuration &Cnf)
Cnf.CndSet("Dir::Media::MountPath","/media/apt");
// State
- Cnf.CndSet("Dir::Log", LOG_DIR + 1);
+ Cnf.CndSet("Dir::Log", &LOG_DIR[1]);
Cnf.CndSet("Dir::Log::Terminal","term.log");
Cnf.CndSet("Dir::Log::History","history.log");
Cnf.CndSet("Dir::Log::Planner","eipp.log.xz");