summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-André Jacquod <pjacquod@alumni.ethz.ch>2011-10-02 12:16:49 +0200
committerPierre-André Jacquod <pjacquod@alumni.ethz.ch>2011-10-07 15:57:40 +0200
commitf8a57bed60fe4aea350582ef5cd70368fd14f0bf (patch)
treec37a9574f235248632c625a3a701381f405fa4e3
parentc528a8e48de0953b35313a66cc5e36064af06e28 (diff)
cppcheck scope reduction of var in crashrep/soreport.cpp
-rw-r--r--crashrep/source/win32/soreport.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/crashrep/source/win32/soreport.cpp b/crashrep/source/win32/soreport.cpp
index af5f725e9adf..a294aa862515 100644
--- a/crashrep/source/win32/soreport.cpp
+++ b/crashrep/source/win32/soreport.cpp
@@ -576,11 +576,11 @@ static string xml_encode( const string &rString )
static size_t fcopy( FILE *fpin, FILE *fpout )
{
char buffer[1024];
- size_t nBytes;
size_t nBytesWritten = 0;
if ( fpin && fpout )
{
+ size_t nBytes;
while ( 0 != (nBytes = fread( buffer, 1, sizeof(buffer), fpin )) )
{
nBytesWritten += fwrite( buffer, 1, nBytes, fpout );
@@ -1878,7 +1878,6 @@ BOOL FindDumpFile()
BOOL WriteDumpFile( DWORD dwProcessId, PEXCEPTION_POINTERS pExceptionPointers, DWORD dwThreadId )
{
BOOL fSuccess = FALSE;
- PMINIDUMP_EXCEPTION_INFORMATION lpExceptionParam = NULL;
MINIDUMP_EXCEPTION_INFORMATION ExceptionParam;
HMODULE hDbgHelp = LoadLibrary( _T("DBGHELP.DLL" ) );
@@ -1923,6 +1922,7 @@ BOOL WriteDumpFile( DWORD dwProcessId, PEXCEPTION_POINTERS pExceptionPointers, D
if ( hFile )
{
+ PMINIDUMP_EXCEPTION_INFORMATION lpExceptionParam = NULL;
if ( pExceptionPointers && dwThreadId )
{
ExceptionParam.ThreadId = dwThreadId;