G++11 Errors

This commit is contained in:
Robin Davies
2022-04-23 12:38:12 -04:00
parent 51c1fb6da9
commit 469b0c0c69
6 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -487,7 +487,7 @@ int main(int argc, char **argv)
throw UnixSocketException("Group not found.");
}
chown("/run/pipedal", -1, group_->gr_gid);
std::ignore = chown("/run/pipedal", -1, group_->gr_gid);
setSignalHandlers();
+2 -2
View File
@@ -66,8 +66,8 @@ void DeviceIdFile::Save()
{
throw logic_error("Group not found: pipedal_d");
}
chown(path.c_str(),-1,group_->gr_gid);
chmod(path.c_str(), S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH);
std::ignore = chown(path.c_str(),-1,group_->gr_gid);
std::ignore = chmod(path.c_str(), S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH);
f << uuid << endl;
+1 -1
View File
@@ -67,7 +67,7 @@ void StdErrorCapture::EndCapture()
dup2(this->oldStdout,STDOUT_HANDLE);
close(this->oldStdout);
this->oldStdout = -1;
chmod(this->tempFileName.c_str(),0644);
std::ignore = chmod(this->tempFileName.c_str(),0644);
}
}
+1 -1
View File
@@ -178,7 +178,7 @@ static void CopyDirectory(const std::filesystem::path &source, const std::filesy
std::filesystem::path destFile = destination / sourceFile.filename();
std::filesystem::copy_file(sourceFile,destFile);
chmod(destFile.c_str(),S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH);
std::ignore = chmod(destFile.c_str(),S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH);
}
}
+4 -4
View File
@@ -124,8 +124,8 @@ void UnixSocket::Bind(const std::string &socketName, const std::string &permissi
}
gid = group_->gr_gid;
chown(data->localAddress.sun_path, -1, gid);
chmod(data->localAddress.sun_path, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
std::ignore = chown(data->localAddress.sun_path, -1, gid);
std::ignore = chmod(data->localAddress.sun_path, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
}
data->socket = s;
@@ -186,8 +186,8 @@ void UnixSocket::Connect(const std::string &remoteSocketName, const std::string
}
gid_t gid = g->gr_gid;
chown(data->localAddress.sun_path, -1, gid);
chmod(data->localAddress.sun_path, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
std::ignore = chown(data->localAddress.sun_path, -1, gid);
std::ignore = chmod(data->localAddress.sun_path, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
}
strcpy(data->remoteAddress.sun_path, remoteSocketName.c_str());