fix misc compile warnings

This commit is contained in:
James Buren 2019-03-01 21:44:35 +01:00 committed by Juergen Daubert
parent 2993a9ad57
commit 041feb25c1
2 changed files with 2 additions and 4 deletions

View File

@ -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,

View File

@ -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);