From 9a6ca9adee847bdc4612cc4f22ef8f457283fd61 Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Sun, 12 Mar 2017 12:35:27 +0100 Subject: [PATCH] Don't shadow variables Signed-off-by: Sven Strickroth --- test/Cache/CacheDlg.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/test/Cache/CacheDlg.cpp b/test/Cache/CacheDlg.cpp index d791cf0ae..4ee6a8795 100644 --- a/test/Cache/CacheDlg.cpp +++ b/test/Cache/CacheDlg.cpp @@ -135,18 +135,18 @@ UINT CCacheDlg::TestThread() std::uniform_int_distribution dist2(0, 9); for (int i=0; i < 1; ++i) { - CString filepath; + CString filepath2; //do { - filepath = m_filelist.GetAt(dist(mt)); + filepath2 = m_filelist.GetAt(dist(mt)); //}while(filepath.Find(L".git") >= 0); - GetDlgItem(IDC_FILEPATH)->SetWindowText(filepath); - GetStatusFromRemoteCache(CTGitPath(filepath), true); + GetDlgItem(IDC_FILEPATH)->SetWindowText(filepath2); + GetStatusFromRemoteCache(CTGitPath(filepath2), true); sNumber.Format(L"%d", i); GetDlgItem(IDC_DONE)->SetWindowText(sNumber); if ((GetTickCount64()%10)==1) Sleep(10); if (dist2(mt) == 3) - RemoveFromCache(filepath); + RemoveFromCache(filepath2); } CTime endtime = CTime::GetCurrentTime(); CString sEnd = endtime.Format(L"%H:%M:%S"); @@ -369,14 +369,14 @@ void CCacheDlg::RemoveFromCache(const CString& path) if (hPipe != INVALID_HANDLE_VALUE) { // now tell the cache we don't need it's command thread anymore - DWORD cbWritten; - TGITCacheCommand cmd; - cmd.command = TGITCACHECOMMAND_END; + DWORD cbWritten2; + TGITCacheCommand cmd2; + cmd2.command = TGITCACHECOMMAND_END; WriteFile( hPipe, // handle to pipe - &cmd, // buffer to write from - sizeof(cmd), // number of bytes to write - &cbWritten, // number of bytes written + &cmd2, // buffer to write from + sizeof(cmd2), // number of bytes to write + &cbWritten2, // number of bytes written NULL); // not overlapped I/O DisconnectNamedPipe(hPipe); CloseHandle(hPipe); -- 2.11.4.GIT