diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-07-15 15:58:03 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-07-15 16:32:31 +0200 |
commit | 146c2e006ef5974ea952ce96eba0109c182db237 (patch) | |
tree | 649d9db66ebba0bbb8a734cd49df99a98448a30f /crashrep | |
parent | 9bb70e18070e40228be5c55ba9720fff72eec54c (diff) |
crashrep: loplugin:unreffun
Change-Id: I83d4c3ee02e59d40e793288d705c3fd06ebe3219
Diffstat (limited to 'crashrep')
-rw-r--r-- | crashrep/source/unx/main.cxx | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/crashrep/source/unx/main.cxx b/crashrep/source/unx/main.cxx index a49ef7e7ff51..65d70e2cdf22 100644 --- a/crashrep/source/unx/main.cxx +++ b/crashrep/source/unx/main.cxx @@ -258,35 +258,6 @@ static void printSettings( const boost::unordered_map<string,string>& rSettings } #endif -bool save_crash_report( const string& rFileName, const boost::unordered_map< string, string >& /*rSettings*/ ) -{ - bool bSuccess = false; - FILE *fpout = fopen( rFileName.c_str(), "w" ); - - if ( fpout ) - { - FILE *fpin = fopen( g_szStackFile, "r" ); - - if ( fpin ) - { - char buf[1024]; - - while (fgets(buf, sizeof(buf), fpin) != NULL) - { - fputs(buf, fpout); - } - - bSuccess = true; - - fclose ( fpin ); - } - - fclose( fpout ); - } - - return bSuccess; -} - bool SendHTTPRequest( FILE *fp, const char *pszServer, @@ -516,45 +487,6 @@ bool send_crash_report( const boost::unordered_map< string, string >& rSettings } -static bool append_file( const char *filename, string& rString ) -{ - FILE *fp = fopen( filename, "r" ); - if ( fp ) - { - char buf[1024]; - while (fgets(buf, sizeof(buf), fp) != NULL) - { - rString.append( buf ); - } - fclose( fp ); - return true; - } - - return false; -} - -string crash_get_details( const boost::unordered_map< string, string >& rSettings ) -{ - string aRet; - - write_description( rSettings ); - write_report( rSettings ); - - aRet.append( rSettings.find( "TITLE" )->second.c_str() ); - aRet.append( "\n\n" ); - append_file( g_szDescriptionFile, aRet ); - aRet.append( "\n\n-------\n\n" ); - append_file( g_szReportFile, aRet ); - aRet.append( "\n\n-------\n\n" ); - append_file( g_szStackFile, aRet ); - - unlink( g_szDescriptionFile ); - unlink( g_szReportFile ); - - return aRet; -} - - // ensure validity of program relative paths static void setup_program_dir( const char* progname ) { |