diff options
author | James Buren <ryuo@ryuo.xyz> | 2019-03-01 21:44:35 +0100 |
---|---|---|
committer | Juergen Daubert <jue@jue.li> | 2019-03-01 21:44:35 +0100 |
commit | 041feb25c11d39371d172e105fbb2025e840fb29 (patch) | |
tree | 17628767778bbe1e0618022b9592450f2a5d0daa | |
parent | 2993a9ad572bc7500155adf5bf101045ddd0e093 (diff) | |
download | prt-get-041feb25c11d39371d172e105fbb2025e840fb29.tar.gz prt-get-041feb25c11d39371d172e105fbb2025e840fb29.tar.xz |
fix misc compile warnings
-rw-r--r-- | src/package.cpp | 2 | ||||
-rw-r--r-- | src/prtget.cpp | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/package.cpp b/src/package.cpp index 8b3779a..458451c 100644 --- a/src/package.cpp +++ b/src/package.cpp @@ -316,10 +316,8 @@ void Package::expandShellCommands(std::string& input, for (int i = 0; i < TAG_COUNT; ++i) { string::size_type pos, dpos = 0; - int len; pos = 0; while ((pos = input.find(startTag[i], pos)) != string::npos) { - len = input.length(); if (unameBuf.release) { input = replaceAll(input, diff --git a/src/prtget.cpp b/src/prtget.cpp index 600b04b..4401daf 100644 --- a/src/prtget.cpp +++ b/src/prtget.cpp @@ -553,7 +553,7 @@ void PrtGet::listInstalled() l.erase(mit); InstallTransaction trans( name, m_repo, m_pkgDB, m_config ); - InstallTransaction::InstallResult result = trans.calcDependencies(); + InstallTransaction::InstallResult result __attribute__((unused)) = trans.calcDependencies(); const list<string>& depRef = trans.dependencies(); list<string>::const_iterator it = depRef.begin(); @@ -1810,7 +1810,7 @@ void PrtGet::ls() DIR* dir = opendir(dirname.c_str()); struct dirent* entry; vector<string> files; - while (entry = readdir(dir)) { + while ((entry = readdir(dir))) { string dName = entry->d_name; if (dName != "." && dName != "..") { files.push_back(dName); |