Fix warnings about untested return value for system and nonconstant format string with no arguments for Throw.

This commit is contained in:
Steve Checkoway
2008-12-26 11:46:47 +00:00
parent e57268a9a9
commit 0c83062440
@@ -232,9 +232,13 @@ void ArchHooks_Unix::SetTime( tm newtime )
newtime.tm_sec ); newtime.tm_sec );
LOG->Trace( "executing '%s'", sCommand.c_str() ); LOG->Trace( "executing '%s'", sCommand.c_str() );
system( sCommand ); int ret = system( sCommand );
if( ret == -1 || ret == 127 || !WIFEXITED(ret) || WEXITSTATUS(ret) )
LOG->Trace( "'%s' failed", sCommand.c_str() );
system( "hwclock --systohc" ); ret = system( "hwclock --systohc" );
if( ret == -1 || ret == 127 || !WIFEXITED(ret) || WEXITSTATUS(ret) )
LOG->Trace( "'hwclock --systohc' failed" );
} }
#include "RageFileManager.h" #include "RageFileManager.h"
@@ -276,7 +280,7 @@ void ArchHooks::MountInitialFilesystems( const RString &sDirOfExecutable )
else if( !stat(RageFileManagerUtil::sInitialWorkingDirectory + "/Songs", &st) && st.st_mode&S_IFDIR ) else if( !stat(RageFileManagerUtil::sInitialWorkingDirectory + "/Songs", &st) && st.st_mode&S_IFDIR )
Root = RageFileManagerUtil::sInitialWorkingDirectory; Root = RageFileManagerUtil::sInitialWorkingDirectory;
else else
RageException::Throw( COULDNT_FIND_SONGS.GetValue() ); RageException::Throw( "%s", COULDNT_FIND_SONGS.GetValue().c_str() );
FILEMAN->Mount( "dir", Root, "/" ); FILEMAN->Mount( "dir", Root, "/" );
} }