mirror of
https://github.com/lubosz/overte.git
synced 2025-04-12 18:52:33 +02:00
Fix mac/ubuntu compiler warning
This commit is contained in:
parent
cb6f7a45f8
commit
377d412264
2 changed files with 7 additions and 7 deletions
|
@ -199,7 +199,7 @@ AssignmentClientApp::AssignmentClientApp(int argc, char* argv[]) :
|
|||
assignmentServerPort = parser.value(assignmentServerPortOption).toInt();
|
||||
}
|
||||
|
||||
quint16 childMinListenPort = INVALID_PORT;
|
||||
quint16 childMinListenPort = 0;
|
||||
if (argumentVariantMap.contains(ASSIGNMENT_MONITOR_MIN_CHILDREN_LISTEN_PORT_OPTION)) {
|
||||
childMinListenPort = argumentVariantMap.value(ASSIGNMENT_MONITOR_MIN_CHILDREN_LISTEN_PORT_OPTION).toUInt();
|
||||
}
|
||||
|
|
|
@ -105,7 +105,7 @@ void AssignmentClientMonitor::childProcessFinished(qint64 pid, quint16 listenPor
|
|||
auto message = "Child process " + QString::number(pid) + " on port " + QString::number(listenPort) +
|
||||
"has %1 with exit code " + QString::number(exitCode) + ".";
|
||||
|
||||
if (listenPort != INVALID_PORT) {
|
||||
if (listenPort) {
|
||||
_childListenPorts.remove(listenPort);
|
||||
}
|
||||
|
||||
|
@ -159,20 +159,20 @@ void AssignmentClientMonitor::aboutToQuit() {
|
|||
void AssignmentClientMonitor::spawnChildClient() {
|
||||
QProcess* assignmentClient = new QProcess(this);
|
||||
|
||||
quint16 listenPort = INVALID_PORT;
|
||||
quint16 listenPort = 0;
|
||||
// allocate a port
|
||||
|
||||
if (_childMinListenPort != INVALID_PORT) {
|
||||
if (_childMinListenPort) {
|
||||
for (listenPort = _childMinListenPort; _childListenPorts.contains(listenPort); listenPort++) {
|
||||
if (_maxAssignmentClientForks &&
|
||||
(listenPort >= _maxAssignmentClientForks + _childMinListenPort)) {
|
||||
listenPort = INVALID_PORT;
|
||||
listenPort = 0;
|
||||
qDebug() << "Insufficient listen ports";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (listenPort != INVALID_PORT) {
|
||||
if (listenPort) {
|
||||
_childListenPorts.insert(listenPort);
|
||||
}
|
||||
|
||||
|
@ -199,7 +199,7 @@ void AssignmentClientMonitor::spawnChildClient() {
|
|||
_childArguments.append(QString::number(_requestAssignmentType));
|
||||
}
|
||||
|
||||
if (listenPort != INVALID_PORT) {
|
||||
if (listenPort) {
|
||||
_childArguments.append("-" + ASSIGNMENT_CLIENT_LISTEN_PORT_OPTION);
|
||||
_childArguments.append(QString::number(listenPort));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue