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
wxString tmparc = fn.GetPath(wxPATH_GET_SEPARATOR) + fn.GetFullName();
// call the archiver to create an archive file
wxString tmparc = fn.GetPath(wxPATH_GET_SEPARATOR) + fn.GetFullName();
// call the archiver to create an archive file
- system(wxString::Format(archiver, tmparc.c_str()).mb_str());
+ if ( system(wxString::Format(archiver, tmparc.c_str()).mb_str()) == -1 )
+ {
+ wxLogError("Failed to run acrhiver command \"%s\"", archiver);
+ }
// then load the archive file
{
// then load the archive file
{
- system(wxString::Format(unarchiver, tmparc.c_str()).mb_str());
+ if ( system(wxString::Format(unarchiver, tmparc.c_str()).mb_str()) == -1 )
+ {
+ wxLogError("Failed to run unarchiver command \"%s\"", unarchiver);
+ }
+
wxRemoveFile(tmparc);
}
else {
wxRemoveFile(tmparc);
}
else {
void FileKindTestCase::Pipe()
{
int afd[2];
void FileKindTestCase::Pipe()
{
int afd[2];
- _pipe(afd, 256, O_BINARY);
+ rc = _pipe(afd, 256, O_BINARY);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Failed to create pipe", 0, rc);
wxFile file0(afd[0]);
wxFile file1(afd[1]);
wxFile file0(afd[0]);
wxFile file1(afd[1]);