diff options
author | Rainer Keller <rainer.keller@theqtcompany.com> | 2015-06-03 09:38:16 +0200 |
---|---|---|
committer | Rainer Keller <rainer.keller@theqtcompany.com> | 2015-06-03 11:27:47 +0300 |
commit | 281140ecdd07fbc48f0bf45d395eedaf6a59fb2f (patch) | |
tree | ef66b69842f77e72b57fbfff4607be9adf124285 | |
parent | 91882497952ebf33a76888b79125ce9cd56994d3 (diff) |
Fix compile warnings
Change-Id: I05fb9bca47f5bcfc3f127eb9a60e6be8bda8193a
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
-rw-r--r-- | main.cpp | 3 | ||||
-rw-r--r-- | process.cpp | 5 |
2 files changed, 5 insertions, 3 deletions
@@ -433,7 +433,8 @@ int main(int argc, char **argv) } setsid(); - chdir("/"); + if (chdir("/") != 0) + return -1; signal(SIGHUP, SIG_IGN); // child diff --git a/process.cpp b/process.cpp index 1fe811b..7842deb 100644 --- a/process.cpp +++ b/process.cpp @@ -129,8 +129,9 @@ void Process::forwardProcessOutput(qintptr fd, const QByteArray &data) fd_set inputFdSet; FD_ZERO(&inputFdSet); FD_SET(pipefd[0], &inputFdSet); - if (select(qMax(fd, pipefd[0]) + 1, &inputFdSet, &outputFdSet, NULL, NULL) > 0 && - !FD_ISSET(pipefd[0], &inputFdSet)) + if (select(qMax(fd, static_cast<qintptr>(pipefd[0])) + 1, + &inputFdSet, &outputFdSet, NULL, NULL) > 0 && + !FD_ISSET(pipefd[0], &inputFdSet)) continue; // else fprintf below will output the appropriate errno } |