diff options
author | Andreas Becker <atayoohoo@googlemail.com> | 2011-04-28 00:59:28 +0200 |
---|---|---|
committer | Katarina Machalkova <kmachalkova@suse.cz> | 2011-04-28 13:45:46 +0200 |
commit | 585b085f4bd1e0bcac8b007a59c18329e199411f (patch) | |
tree | be1a3e604b1cab604f716a8036e6a890ba50aac9 /crashrep | |
parent | f4ae23c798d4403599d5a12d6bb634668996cbd3 (diff) |
fixed cppcheck warnings
Diffstat (limited to 'crashrep')
-rw-r--r-- | crashrep/source/unx/main.cxx | 12 | ||||
-rw-r--r-- | crashrep/source/win32/base64.cpp | 2 |
2 files changed, 4 insertions, 10 deletions
diff --git a/crashrep/source/unx/main.cxx b/crashrep/source/unx/main.cxx index 3606d34df..5426b1340 100644 --- a/crashrep/source/unx/main.cxx +++ b/crashrep/source/unx/main.cxx @@ -484,12 +484,9 @@ static void WriteSOAPRequest( FILE *fp ) struct RequestParams { - bool success; - FILE *fpin; + FILE *fpin; const char *pServer; - unsigned short uPort; const char *pProxyServer; - unsigned short uProxyPort; }; @@ -540,9 +537,8 @@ bool send_crash_report( const boost::unordered_map< string, string >& rSettings static bool append_file( const char *filename, string& rString ) { - char buf[1024]; - bool bSuccess = false; - + char buf[1024]; + FILE *fp = fopen( filename, "r" ); if ( fp ) { @@ -553,7 +549,7 @@ static bool append_file( const char *filename, string& rString ) } fclose( fp ); } - + return true; } diff --git a/crashrep/source/win32/base64.cpp b/crashrep/source/win32/base64.cpp index 3f2e85237..15fdc0c39 100644 --- a/crashrep/source/win32/base64.cpp +++ b/crashrep/source/win32/base64.cpp @@ -34,7 +34,6 @@ static const char base64_tab[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrst extern "C" size_t base64_encode( FILE *fin, FILE *fout ) { - size_t nBytesRead = 0; size_t nLineLength = 0; size_t nBytesWritten = 0; @@ -46,7 +45,6 @@ extern "C" size_t base64_encode( FILE *fin, FILE *fout ) memset( in_buffer, 0, sizeof(in_buffer) ); nBytes = fread( in_buffer, 1, sizeof(in_buffer), fin ); - nBytesRead += nBytes; if ( nBytes ) { |