Check the return value of system() and pipe() in the test suite.
This is mainly to avoid -Wunused-result warnings under recent Linux systems but also could give valuable information if the call does fail. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72714 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -127,11 +127,13 @@ void FileKindTestCase::File()
|
||||
void FileKindTestCase::Pipe()
|
||||
{
|
||||
int afd[2];
|
||||
int rc;
|
||||
#ifdef __UNIX__
|
||||
pipe(afd);
|
||||
rc = pipe(afd);
|
||||
#else
|
||||
_pipe(afd, 256, O_BINARY);
|
||||
rc = _pipe(afd, 256, O_BINARY);
|
||||
#endif
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("Failed to create pipe", 0, rc);
|
||||
|
||||
wxFile file0(afd[0]);
|
||||
wxFile file1(afd[1]);
|
||||
|
Reference in New Issue
Block a user