From 76f37cb099c69662a3aa4d2d1b0384d0e567aef5 Mon Sep 17 00:00:00 2001 From: Frank Li Date: Sat, 19 Feb 2011 12:48:58 +0800 Subject: [PATCH] Clean up warning Signed-off-by: Frank Li --- src/Git/TGitPath.cpp | 2 +- src/Git/TGitPath.h | 2 +- src/TortoiseProc/BrowseRefsDlg.cpp | 3 ++- src/TortoiseProc/CheckForUpdatesDlg.cpp | 2 +- src/TortoiseProc/FileDiffDlg.cpp | 4 ++-- src/TortoiseProc/ImportPatchDlg.cpp | 2 +- src/TortoiseProc/PatchListCtrl.cpp | 2 +- src/TortoiseProc/PatchListCtrl.h | 2 +- src/TortoiseProc/SwitchDlg.cpp | 2 +- src/TortoiseProc/SyncDlg.cpp | 7 ++++--- 10 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/Git/TGitPath.cpp b/src/Git/TGitPath.cpp index 5a69d2fb2..7fab1c883 100644 --- a/src/Git/TGitPath.cpp +++ b/src/Git/TGitPath.cpp @@ -432,7 +432,7 @@ void CTGitPath::UpdateAttributes() const m_bExistsKnown = true; } -CTGitPath CTGitPath::GetSubPath(CTGitPath &root) +CTGitPath CTGitPath::GetSubPath(const CTGitPath &root) { CTGitPath path; diff --git a/src/Git/TGitPath.h b/src/Git/TGitPath.h index 269ee2cc7..70131a088 100644 --- a/src/Git/TGitPath.h +++ b/src/Git/TGitPath.h @@ -104,7 +104,7 @@ public: */ bool IsDirectory() const; - CTGitPath GetSubPath(CTGitPath &root); + CTGitPath GetSubPath(const CTGitPath &root); /** * Returns the directory. If the path points to a directory, then the path diff --git a/src/TortoiseProc/BrowseRefsDlg.cpp b/src/TortoiseProc/BrowseRefsDlg.cpp index 8c379701d..29de12d60 100644 --- a/src/TortoiseProc/BrowseRefsDlg.cpp +++ b/src/TortoiseProc/BrowseRefsDlg.cpp @@ -576,7 +576,8 @@ void CBrowseRefsDlg::OnContextMenu_RefTreeCtrl(CPoint point) if(hTreeItem!=NULL) m_RefTreeCtrl.Select(hTreeItem,TVGN_CARET); - ShowContextMenu(point,hTreeItem,VectorPShadowTree()); + VectorPShadowTree tree; + ShowContextMenu(point,hTreeItem,tree); } diff --git a/src/TortoiseProc/CheckForUpdatesDlg.cpp b/src/TortoiseProc/CheckForUpdatesDlg.cpp index 77eb5317a..5d1dba327 100644 --- a/src/TortoiseProc/CheckForUpdatesDlg.cpp +++ b/src/TortoiseProc/CheckForUpdatesDlg.cpp @@ -118,7 +118,7 @@ UINT CCheckForUpdatesDlg::CheckThread() { CStdioFile file(tempfile, CFile::modeRead | CFile::shareDenyWrite); CString ver; - int major,minor,micro,build; + __int64 major,minor,micro,build; major=minor=micro=build=0; unsigned __int64 version=0; diff --git a/src/TortoiseProc/FileDiffDlg.cpp b/src/TortoiseProc/FileDiffDlg.cpp index 2a11f2fe8..4b41903cd 100644 --- a/src/TortoiseProc/FileDiffDlg.cpp +++ b/src/TortoiseProc/FileDiffDlg.cpp @@ -1422,7 +1422,7 @@ BOOL CFileDiffDlg::DestroyWindow() return CResizableStandAloneDialog::DestroyWindow(); } -LRESULT CFileDiffDlg::OnEnUpdate(WPARAM wParam, LPARAM lParam) +LRESULT CFileDiffDlg::OnEnUpdate(WPARAM /*wParam*/, LPARAM lParam) { if(lParam == IDC_REV1EDIT) { @@ -1437,7 +1437,7 @@ LRESULT CFileDiffDlg::OnEnUpdate(WPARAM wParam, LPARAM lParam) return 0; } -void CFileDiffDlg::OnTextUpdate(CACEdit *pEdit) +void CFileDiffDlg::OnTextUpdate(CACEdit * /*pEdit*/) { SetTimer(IDT_INPUT, 1000, NULL); this->m_cFileList.ShowText(_T("Wait For input validate version")); diff --git a/src/TortoiseProc/ImportPatchDlg.cpp b/src/TortoiseProc/ImportPatchDlg.cpp index 3f93202d4..993af2b5b 100644 --- a/src/TortoiseProc/ImportPatchDlg.cpp +++ b/src/TortoiseProc/ImportPatchDlg.cpp @@ -548,7 +548,7 @@ BOOL CImportPatchDlg::PreTranslateMessage(MSG* pMsg) return CResizableStandAloneDialog::PreTranslateMessage(pMsg); } -void CImportPatchDlg::OnHdnItemchangedListPatch(NMHDR *pNMHDR, LRESULT *pResult) +void CImportPatchDlg::OnHdnItemchangedListPatch(NMHDR * /*pNMHDR*/, LRESULT *pResult) { *pResult = 0; diff --git a/src/TortoiseProc/PatchListCtrl.cpp b/src/TortoiseProc/PatchListCtrl.cpp index 415c6fdd0..f88bae564 100644 --- a/src/TortoiseProc/PatchListCtrl.cpp +++ b/src/TortoiseProc/PatchListCtrl.cpp @@ -129,7 +129,7 @@ void CPatchListCtrl::OnContextMenu(CWnd* /*pWnd*/, CPoint point) } } -int CPatchListCtrl::LaunchProc(CString& command) +int CPatchListCtrl::LaunchProc(const CString& command) { CString tempfile=GetTempFile(); POSITION pos=this->GetFirstSelectedItemPosition(); diff --git a/src/TortoiseProc/PatchListCtrl.h b/src/TortoiseProc/PatchListCtrl.h index 32025fdd8..a03faeeaf 100644 --- a/src/TortoiseProc/PatchListCtrl.h +++ b/src/TortoiseProc/PatchListCtrl.h @@ -40,7 +40,7 @@ protected: public: afx_msg void OnNMDblclk(NMHDR *pNMHDR, LRESULT *pResult); afx_msg void OnContextMenu(CWnd* /*pWnd*/, CPoint /*point*/); - int LaunchProc(CString& cmd); + int LaunchProc(const CString& cmd); afx_msg void OnNMCustomdraw(NMHDR *pNMHDR, LRESULT *pResult); }; diff --git a/src/TortoiseProc/SwitchDlg.cpp b/src/TortoiseProc/SwitchDlg.cpp index 0b61c5fda..7264b0d5d 100644 --- a/src/TortoiseProc/SwitchDlg.cpp +++ b/src/TortoiseProc/SwitchDlg.cpp @@ -176,7 +176,7 @@ void CSwitchDlg::OnEnChangeRevisionNum() CheckRadioButton(IDC_REVISION_HEAD, IDC_REVISION_N, IDC_REVISION_N); } -void CSwitchDlg::SetRevision(const GitRev& rev) +void CSwitchDlg::SetRevision(const GitRev& /*rev*/) { // if (rev.IsHead()) // CheckRadioButton(IDC_REVISION_HEAD, IDC_REVISION_N, IDC_REVISION_HEAD); diff --git a/src/TortoiseProc/SyncDlg.cpp b/src/TortoiseProc/SyncDlg.cpp index cfdbbe674..6069f3366 100644 --- a/src/TortoiseProc/SyncDlg.cpp +++ b/src/TortoiseProc/SyncDlg.cpp @@ -305,10 +305,11 @@ void CSyncDlg::PullComplete() this->m_ctrlTabCtrl.ShowTab(IDC_IN_CHANGELIST-1,true); this->m_ctrlTabCtrl.ShowTab(IDC_IN_LOGLIST-1,true); - this->AddDiffFileList(&m_InChangeFileList,&m_arInChangeList,newhash,m_oldHash.ToString()); + CString oldhash=m_oldHash.ToString(); + this->AddDiffFileList(&m_InChangeFileList,&m_arInChangeList,newhash,oldhash); m_InLogList.FillGitLog(NULL,CGit:: LOG_INFO_STAT| CGit::LOG_INFO_FILESTATE | CGit::LOG_INFO_SHOW_MERGEDFILE, - &this->m_oldHash.ToString(),&newhash); + &oldhash,&newhash); } this->ShowTab(IDC_IN_LOGLIST); } @@ -999,7 +1000,7 @@ LRESULT CSyncDlg::OnProgressUpdateUI(WPARAM wParam,LPARAM lParam) } if(lParam != 0) - ParserCmdOutput((TCHAR)lParam); + ParserCmdOutput((char)lParam); return 0; } -- 2.11.4.GIT