Преглед изворни кода

Removed extraneous compiler warnings about unused return values.


git-svn-id: https://svn.microneil.com/svn/CodeDweller/branches/adeniz_1@107 d34b734f-a00e-4b39-a726-e4eeb87269ab
adeniz_1
adeniz пре 9 година
родитељ
комит
c4836264a8
1 измењених фајлова са 13 додато и 9 уклоњено
  1. 13
    9
      child.cpp

+ 13
- 9
child.cpp Прегледај датотеку

@@ -29,6 +29,10 @@
#include <cstring>
#include <cerrno>
/// Dummy used to suppressed warnings about unused values.
int iDummy;
#endif
#include <stdexcept>
@@ -276,7 +280,7 @@ namespace CodeDweller {
// Send message to parent.
errMsg = "Error redirecting stdin in the child: " + getErrorText();
::write(childStdOutPipe[1], errMsg.data(), errMsg.size());
iDummy = ::write(childStdOutPipe[1], errMsg.data(), errMsg.size());
exit(-1);
}
@@ -286,7 +290,7 @@ namespace CodeDweller {
// Send message to parent.
errMsg = "Error redirecting stdout in the child: " + getErrorText();
::write(childStdOutPipe[1], errMsg.data(), errMsg.size());
iDummy = ::write(childStdOutPipe[1], errMsg.data(), errMsg.size());
exit(-1);
}
@@ -299,7 +303,7 @@ namespace CodeDweller {
// Send message to parent.
errMsg = "Error closing the pipes in the child: " + getErrorText();
::write(STDOUT_FILENO, errMsg.data(), errMsg.size());
iDummy = ::write(STDOUT_FILENO, errMsg.data(), errMsg.size());
exit(-1);
}
@@ -320,7 +324,7 @@ namespace CodeDweller {
// Send message to parent.
errMsg = "Error from exec: " + getErrorText();
::write(STDOUT_FILENO, errMsg.data(), errMsg.size());
iDummy = ::write(STDOUT_FILENO, errMsg.data(), errMsg.size());
exit(-1);
}
@@ -1195,7 +1199,7 @@ namespace CodeDweller {
// Send message to parent.
errMsg = "Error redirecting stdin in the child: " + getErrorText();
::write(childStdOutPipe[1], errMsg.data(), errMsg.size());
iDummy = ::write(childStdOutPipe[1], errMsg.data(), errMsg.size());
exit(-1);
}
@@ -1205,7 +1209,7 @@ namespace CodeDweller {
// Send message to parent.
errMsg = "Error redirecting stdout in the child: " + getErrorText();
::write(childStdOutPipe[1], errMsg.data(), errMsg.size());
iDummy = ::write(childStdOutPipe[1], errMsg.data(), errMsg.size());
exit(-1);
}
@@ -1214,7 +1218,7 @@ namespace CodeDweller {
// Send message to parent.
errMsg = "Error redirecting stderr in the child: " + getErrorText();
::write(childStdOutPipe[1], errMsg.data(), errMsg.size());
iDummy = ::write(childStdOutPipe[1], errMsg.data(), errMsg.size());
exit(-1);
}
@@ -1227,7 +1231,7 @@ namespace CodeDweller {
// Send message to parent.
errMsg = "Error closing the pipes in the child: " + getErrorText();
::write(STDOUT_FILENO, errMsg.data(), errMsg.size());
iDummy = ::write(STDOUT_FILENO, errMsg.data(), errMsg.size());
exit(-1);
}
@@ -1250,7 +1254,7 @@ namespace CodeDweller {
errMsg = "Error (from exec) running the command \"";
errMsg += execvArgv[0];
errMsg += ": " + getErrorText();
::write(STDOUT_FILENO, errMsg.data(), errMsg.size());
iDummy = ::write(STDOUT_FILENO, errMsg.data(), errMsg.size());
exit(-1);
}

Loading…
Откажи
Сачувај