Index: src/ch/ClipboardMonitor.cpp =================================================================== diff -u -r5057e08b0cc064972abeb94a488e5f12d9db14a0 -r9352ed0c4fe447a36bc728640c307be6d41455fd --- src/ch/ClipboardMonitor.cpp (.../ClipboardMonitor.cpp) (revision 5057e08b0cc064972abeb94a488e5f12d9db14a0) +++ src/ch/ClipboardMonitor.cpp (.../ClipboardMonitor.cpp) (revision 9352ed0c4fe447a36bc728640c307be6d41455fd) @@ -154,7 +154,7 @@ bs.m_uiLANSize=(UINT)rConfig.get_signed_num(PP_BFLAN); pTask->SetBufferSizes(&bs); - pTask->SetPriority((int)rConfig.get_signed_num(PP_CMDEFAULTPRIORITY)); + pTask->SetPriority(boost::numeric_cast(rConfig.get_signed_num(PP_CMDEFAULTPRIORITY))); // get dest folder CFolderDialog dlg; @@ -177,9 +177,9 @@ } dlg.m_bdData.bExtended=rConfig.get_bool(PP_FDEXTENDEDVIEW); - dlg.m_bdData.cx=(int)rConfig.get_signed_num(PP_FDWIDTH); - dlg.m_bdData.cy=(int)rConfig.get_signed_num(PP_FDHEIGHT); - dlg.m_bdData.iView=(int)rConfig.get_signed_num(PP_FDSHORTCUTLISTSTYLE); + dlg.m_bdData.cx=boost::numeric_cast(rConfig.get_signed_num(PP_FDWIDTH)); + dlg.m_bdData.cy=boost::numeric_cast(rConfig.get_signed_num(PP_FDHEIGHT)); + dlg.m_bdData.iView=boost::numeric_cast(rConfig.get_signed_num(PP_FDSHORTCUTLISTSTYLE)); dlg.m_bdData.bIgnoreDialogs=rConfig.get_bool(PP_FDIGNORESHELLDIALOGS); dlg.m_bdData.strInitialDir=(dlg.m_bdData.cvRecent.size() > 0) ? dlg.m_bdData.cvRecent.at(0) : _T(""); @@ -238,8 +238,10 @@ pTask->SetDestPath(strData); // get the relationship between src and dst paths - for (int i=0;iGetClipboard()->GetSize();i++) - pTask->GetClipboard()->GetAt(i)->CalcBufferIndex(pTask->GetDestPath()); + for (size_t stIndex = 0; stIndex < pTask->GetClipboard()->GetSize(); ++stIndex) + { + pTask->GetClipboard()->GetAt(stIndex)->CalcBufferIndex(pTask->GetDestPath()); + } // add task to a list of tasks and start pData->m_pTasks->Add(pTask); @@ -271,7 +273,7 @@ if (GetConfig().get_signed_num(PP_PTIMEBEFORESHUTDOWN) != 0) { CShutdownDlg dlg; - dlg.m_iOverallTime=(int)GetConfig().get_signed_num(PP_PTIMEBEFORESHUTDOWN); + dlg.m_iOverallTime = boost::numeric_cast(GetConfig().get_signed_num(PP_PTIMEBEFORESHUTDOWN)); if (dlg.m_iOverallTime < 0) dlg.m_iOverallTime=-dlg.m_iOverallTime; bShutdown=(dlg.DoModal() != IDCANCEL); Index: src/ch/CustomCopyDlg.cpp =================================================================== diff -u -r5057e08b0cc064972abeb94a488e5f12d9db14a0 -r9352ed0c4fe447a36bc728640c307be6d41455fd --- src/ch/CustomCopyDlg.cpp (.../CustomCopyDlg.cpp) (revision 5057e08b0cc064972abeb94a488e5f12d9db14a0) +++ src/ch/CustomCopyDlg.cpp (.../CustomCopyDlg.cpp) (revision 9352ed0c4fe447a36bc728640c307be6d41455fd) @@ -202,15 +202,15 @@ CString strText; cbi.mask=CBEIF_IMAGE | CBEIF_TEXT; - for (int i=0;i<(int)m_ccData.m_vRecent.size();i++) + for(size_t stIndex = 0; stIndex < m_ccData.m_vRecent.size(); ++stIndex) { - cbi.iItem=i; - strText=m_ccData.m_vRecent.at(i); - cbi.pszText=strText.GetBuffer(1); - sfi.iIcon=-1; + cbi.iItem = stIndex; + strText=m_ccData.m_vRecent.at(stIndex); + cbi.pszText = strText.GetBuffer(1); + sfi.iIcon = -1; SHGetFileInfo(strText, FILE_ATTRIBUTE_NORMAL, &sfi, sizeof(SHFILEINFO), SHGFI_SYSICONINDEX | SHGFI_SMALLICON); - cbi.iImage=sfi.iIcon; + cbi.iImage = sfi.iIcon; m_ctlDstPath.InsertItem(&cbi); } @@ -390,11 +390,11 @@ // refresh the entries in filters' list m_ctlFilters.DeleteAllItems(); - for (size_t i=0;i(stIndex)); } } @@ -409,29 +409,30 @@ { CFileDialog dlg(TRUE, NULL, NULL, OFN_ALLOWMULTISELECT | OFN_ENABLESIZING | OFN_EXPLORER | OFN_FILEMUSTEXIST | OFN_NODEREFERENCELINKS | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, GetResManager().LoadString(IDS_FILEDLGALLFILTER_STRING), this); - TCHAR *pszBuffer=new TCHAR[65535]; + TCHAR *pszBuffer = new TCHAR[65535]; memset(pszBuffer, 0, 65535*sizeof(TCHAR)); dlg.m_ofn.lpstrFile=pszBuffer; dlg.m_ofn.nMaxFile=65535; - if (dlg.DoModal() == IDOK) + if(dlg.DoModal() == IDOK) { + pszBuffer[65534] = _T('\0'); // first element is the path CString strPath=pszBuffer; - int iOffset = (int)_tcslen(pszBuffer) + 1; + size_t stOffset = _tcslen(pszBuffer) + 1; // get filenames - if (pszBuffer[iOffset] == _T('\0')) + if(pszBuffer[stOffset] == _T('\0')) AddPath(strPath); else { - if (strPath.Right(1) != _T("\\")) - strPath+=_T("\\"); - while (pszBuffer[iOffset] != _T('\0')) + if(strPath.Right(1) != _T("\\")) + strPath += _T("\\"); + while(pszBuffer[stOffset] != _T('\0')) { - AddPath(strPath+CString(pszBuffer+iOffset)); - iOffset += (int)_tcslen(pszBuffer+iOffset) + 1; + AddPath(strPath + CString(pszBuffer + stOffset)); + stOffset += _tcslen(pszBuffer + stOffset) + 1; } } } @@ -813,15 +814,15 @@ dlg.m_ffFilter = *pFilter; CString strData; - for (size_t i=0;im_bUseMask && i != iItem) + if(pFilter->m_bUseMask && boost::numeric_cast(stIndex) != iItem) dlg.m_astrAddMask.Add(pFilter->GetCombinedMask(strData)); - if (pFilter->m_bUseExcludeMask && i != iItem) + if (pFilter->m_bUseExcludeMask && boost::numeric_cast(stIndex) != iItem) dlg.m_astrAddExcludeMask.Add(pFilter->GetCombinedExcludeMask(strData)); } } @@ -939,7 +940,7 @@ ulong_t ulSize = 0; CFileDialog dlg(TRUE, NULL, NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, GetResManager().LoadString(IDS_FLTALLFILTER_STRING)); - if (dlg.DoModal() == IDOK) + if(dlg.DoModal() == IDOK) { UINT uiCount=0; try @@ -955,10 +956,11 @@ return; } - spBuffer.reset(new BYTE[llSize + 3]); // guarantee that we have null at the end of the string (3 bytes to compensate for possible odd number of bytes and for unicode) - memset(spBuffer.get(), 0, llSize + 3); + ulong_t ulSize = boost::numeric_cast(llSize); + spBuffer.reset(new BYTE[ulSize + 3]); // guarantee that we have null at the end of the string (3 bytes to compensate for possible odd number of bytes and for unicode) + memset(spBuffer.get(), 0, ulSize + 3); - ulSize = file.read(spBuffer.get(), (ulong_t)llSize); + ulSize = file.read(spBuffer.get(), ulSize); file.close(); } catch(...) @@ -967,7 +969,7 @@ return; } - // parse text from buffer (there is no point processing files with size < 3 - i.e. "c:") + // parse text from buffer (there is no point processing files with size < 3 - stIndex.e. "c:") if(!spBuffer || ulSize < 3) { AfxMessageBox(GetResManager().LoadString(IDS_IMPORTERROR_STRING)); Index: src/ch/Device IO.h =================================================================== diff -u -r2b67cda63fcaa69c7838641d33198e10f37af9e1 -r9352ed0c4fe447a36bc728640c307be6d41455fd --- src/ch/Device IO.h (.../Device IO.h) (revision 2b67cda63fcaa69c7838641d33198e10f37af9e1) +++ src/ch/Device IO.h (.../Device IO.h) (revision 9352ed0c4fe447a36bc728640c307be6d41455fd) @@ -31,58 +31,58 @@ return false; // search for all, to find out in which string is the signature - int iCount, iCount2; - if ((iCount=QueryDosDevice(NULL, szQuery.get(), 16384)) == 0) + DWORD dwCount, dwCount2; + if ((dwCount=QueryDosDevice(NULL, szQuery.get(), 16384)) == 0) { TRACE("Encountered error #%lu @QueryDosDevice\n", GetLastError()); return false; } - size_t iOffset=0, iOffset2=0; + DWORD dwOffset = 0, dwOffset2 = 0; TCHAR* pszSignature = NULL; TCHAR* pszOffset = NULL; - while(iOffset < iCount) + while(dwOffset < dwCount) { - if(_tcsncmp(szQuery.get() + iOffset, _T("STORAGE#Volume#"), _tcslen(_T("STORAGE#Volume#"))) == 0) + if(_tcsncmp(szQuery.get() + dwOffset, _T("STORAGE#Volume#"), _tcslen(_T("STORAGE#Volume#"))) == 0) { - if((iCount2 = QueryDosDevice(szQuery.get() + iOffset, szSymbolic.get(), 1024)) == 0) + if((dwCount2 = QueryDosDevice(szQuery.get() + dwOffset, szSymbolic.get(), 1024)) == 0) return false; - // now search for 'Signature' and extract (from szQuery+iOffset) - pszSignature=_tcsstr(szQuery.get() + iOffset, _T("Signature")); + // now search for 'Signature' and extract (from szQuery+dwOffset) + pszSignature=_tcsstr(szQuery.get() + dwOffset, _T("Signature")); if (pszSignature == NULL) { - iOffset+=_tcslen(szQuery.get() + iOffset)+1; + dwOffset += boost::numeric_cast(_tcslen(szQuery.get() + dwOffset) + 1); continue; } pszOffset=_tcsstr(pszSignature, _T("Offset")); if (pszOffset == NULL) { - iOffset+=_tcslen(szQuery.get() + iOffset)+1; + dwOffset += boost::numeric_cast(_tcslen(szQuery.get() + dwOffset) + 1); continue; } // for better string copying pszOffset[0]=_T('\0'); // read values from szSymbolic and compare with szMapping - iOffset2=0; - while (iOffset2 < iCount2) + dwOffset2=0; + while(dwOffset2 < dwCount2) { - // compare szSymbolic+iOffset2 with szMapping - if (_tcscmp(szMapping.get(), szSymbolic.get() + iOffset2) == 0) + // compare szSymbolic+dwOffset2 with szMapping + if (_tcscmp(szMapping.get(), szSymbolic.get() + dwOffset2) == 0) { // found Signature & Offset - copy int iCnt=reinterpret_cast(pszOffset)-reinterpret_cast(pszSignature)+1; _tcsncpy(lpszBuffer, pszSignature, (iCnt > iSize) ? iSize : iCnt); return true; } - iOffset2+=_tcslen(szSymbolic.get())+1; + dwOffset2 += boost::numeric_cast(_tcslen(szSymbolic.get()) + 1); } } - iOffset+=_tcslen(szQuery.get() + iOffset)+1; + dwOffset += boost::numeric_cast(_tcslen(szQuery.get() + dwOffset) + 1); } return false; Index: src/ch/FolderDialog.cpp =================================================================== diff -u -r3dbe8c6e46f558588d997795f62c8362138aeca9 -r9352ed0c4fe447a36bc728640c307be6d41455fd --- src/ch/FolderDialog.cpp (.../FolderDialog.cpp) (revision 3dbe8c6e46f558588d997795f62c8362138aeca9) +++ src/ch/FolderDialog.cpp (.../FolderDialog.cpp) (revision 9352ed0c4fe447a36bc728640c307be6d41455fd) @@ -424,14 +424,14 @@ CString strText; cbi.mask=CBEIF_IMAGE | CBEIF_TEXT; - for (int i=0;i<(int)m_bdData.cvRecent.size();i++) + for(size_t stIndex = 0; stIndex < m_bdData.cvRecent.size(); ++stIndex) { - cbi.iItem=i; - cbi.pszText=m_bdData.cvRecent.at(i); - sfi.iIcon=-1; - SHGetFileInfo(m_bdData.cvRecent.at(i), FILE_ATTRIBUTE_NORMAL, &sfi, sizeof(SHFILEINFO), + cbi.iItem = stIndex; + cbi.pszText = m_bdData.cvRecent.at(stIndex); + sfi.iIcon = -1; + SHGetFileInfo(m_bdData.cvRecent.at(stIndex), FILE_ATTRIBUTE_NORMAL, &sfi, sizeof(SHFILEINFO), SHGFI_SYSICONINDEX | SHGFI_SMALLICON); - cbi.iImage=sfi.iIcon; + cbi.iImage = sfi.iIcon; m_ctlPath.InsertItem(&cbi); } @@ -453,13 +453,13 @@ // update shortcuts' list CShortcut sc; - for (int i=0;i<(int)m_bdData.cvShortcuts.size();i++) + for(size_t stIndex = 0; stIndex < m_bdData.cvShortcuts.size(); ++stIndex) { - sc=CString(m_bdData.cvShortcuts.at(i)); - sfi.iIcon=-1; + sc = CString(m_bdData.cvShortcuts.at(stIndex)); + sfi.iIcon = -1; SHGetFileInfo(sc.m_strPath, FILE_ATTRIBUTE_NORMAL, &sfi, sizeof(sfi), SHGFI_SYSICONINDEX | SHGFI_LARGEICON); - m_ctlShortcuts.InsertItem(i, sc.m_strName, sfi.iIcon); - m_ctlShortcuts.SetItem(i, 1, LVIF_TEXT, sc.m_strPath, 0, 0, 0, 0); + m_ctlShortcuts.InsertItem(boost::numeric_cast(stIndex), sc.m_strName, sfi.iIcon); + m_ctlShortcuts.SetItem(boost::numeric_cast(stIndex), 1, LVIF_TEXT, sc.m_strPath, 0, 0, 0, 0); } // now resize and ok. @@ -599,7 +599,7 @@ switch (message) { case WM_CREATEFOLDERRESULT: - if (((int)lParam) != 1) + if (lParam != 1) MsgBox(IDS_BDCANNOTCREATEFOLDER_STRING); break; case WM_THEMECHANGED: @@ -694,7 +694,7 @@ NMLVGETINFOTIP* pit=(NMLVGETINFOTIP*)pNMHDR; m_strTip.Empty(); - if (pit->iItem < 0 || pit->iItem >= (int)m_bdData.cvShortcuts.size()) + if (pit->iItem < 0 || pit->iItem >= boost::numeric_cast(m_bdData.cvShortcuts.size())) return; // out of range CShortcut sc=CString(m_bdData.cvShortcuts.at(pit->iItem)); @@ -830,7 +830,7 @@ NMLISTVIEW* plv=(NMLISTVIEW*)pNMHDR; // current selection - if (plv->iItem >= 0 && plv->iItem < (int)m_bdData.cvShortcuts.size()) + if (plv->iItem >= 0 && plv->iItem < boost::numeric_cast(m_bdData.cvShortcuts.size())) { CShortcut sc=CString(m_bdData.cvShortcuts.at(plv->iItem)); m_ctlTree.SetPath(sc.m_strPath); @@ -866,7 +866,7 @@ // add to an array and to shortcuts list m_bdData.cvShortcuts.push_back((const PTSTR)(LPCTSTR)(CString)(sc), true); - int iIndex = (int)m_bdData.cvShortcuts.size() - 1; + int iIndex = boost::numeric_cast(m_bdData.cvShortcuts.size() - 1); m_ctlShortcuts.InsertItem(iIndex, sc.m_strName, sfi.iIcon); m_ctlShortcuts.SetItem(iIndex, 1, LVIF_TEXT, sc.m_strPath, 0, 0, 0, 0); Index: src/ch/MainWnd.cpp =================================================================== diff -u -r5057e08b0cc064972abeb94a488e5f12d9db14a0 -r9352ed0c4fe447a36bc728640c307be6d41455fd --- src/ch/MainWnd.cpp (.../MainWnd.cpp) (revision 5057e08b0cc064972abeb94a488e5f12d9db14a0) +++ src/ch/MainWnd.cpp (.../MainWnd.cpp) (revision 9352ed0c4fe447a36bc728640c307be6d41455fd) @@ -405,13 +405,13 @@ CTask* pTask; if (GetConfig().get_signed_num(PP_CMLIMITMAXOPERATIONS) == 0 || m_tasks.GetOperationsPending() < (UINT)GetConfig().get_signed_num(PP_CMLIMITMAXOPERATIONS)) { - for (int i=0;iGetStatus(ST_WAITING_MASK) & ST_WAITING && (GetConfig().get_signed_num(PP_CMLIMITMAXOPERATIONS) == 0 || m_tasks.GetOperationsPending() < (UINT)GetConfig().get_signed_num(PP_CMLIMITMAXOPERATIONS))) { - TRACE("Enabling task %ld\n", i); + TRACE("Enabling task %ld\n", stIndex); pTask->SetContinueFlag(true); pTask->IncreaseOperationsPending(); pTask->SetStatus(0, ST_WAITING); // turn off wait state @@ -476,7 +476,7 @@ // special operation - modify stuff CFiltersArray ffFilters; - int iPriority=(int)GetConfig().get_signed_num(PP_CMDEFAULTPRIORITY); + int iPriority = boost::numeric_cast(GetConfig().get_signed_num(PP_CMDEFAULTPRIORITY)); BUFFERSIZES bsSizes; bsSizes.m_bOnlyDefault=GetConfig().get_bool(PP_BFUSEONLYDEFAULT); bsSizes.m_uiDefaultSize=(UINT)GetConfig().get_signed_num(PP_BFDEFAULT); @@ -591,7 +591,7 @@ CCustomCopyDlg dlg; dlg.m_ccData.m_iOperation=0; - dlg.m_ccData.m_iPriority=(int)rConfig.get_signed_num(PP_CMDEFAULTPRIORITY); + dlg.m_ccData.m_iPriority = boost::numeric_cast(rConfig.get_signed_num(PP_CMDEFAULTPRIORITY)); dlg.m_ccData.m_bsSizes.m_bOnlyDefault=rConfig.get_bool(PP_BFUSEONLYDEFAULT); dlg.m_ccData.m_bsSizes.m_uiDefaultSize=(UINT)rConfig.get_signed_num(PP_BFDEFAULT); dlg.m_ccData.m_bsSizes.m_uiOneDiskSize=(UINT)rConfig.get_signed_num(PP_BFONEDISK); @@ -766,7 +766,7 @@ } // count of shortcuts to store - g_pscsShared->iShortcutsCount = (int)__min(cvShortcuts.size(), (SHARED_BUFFERSIZE - 5 * sizeof(_COMMAND)) / sizeof(_SHORTCUT)); + g_pscsShared->iShortcutsCount = boost::numeric_cast(std::min(cvShortcuts.size(), (SHARED_BUFFERSIZE - 5 * sizeof(_COMMAND)) / sizeof(_SHORTCUT))); _SHORTCUT* pShortcut = g_pscsShared->GetShortcutsPtr(); CShortcut sc; for (int i=0;iiShortcutsCount;i++) @@ -926,17 +926,19 @@ CClipboardMonitor::StopMonitor(); // kill all unfinished tasks - send kill request - for (int i=0;iSetKillFlag(); + for(size_t stIndex = 0; stIndex < m_tasks.GetSize(); ++stIndex) + { + m_tasks.GetAt(stIndex)->SetKillFlag(); + } // wait for finishing - for (int i=0;iGetKilledFlag()) + while(!m_tasks.GetAt(stIndex)->GetKilledFlag()) Sleep(10); - m_tasks.GetAt(i)->CleanupAfterKill(); + m_tasks.GetAt(stIndex)->CleanupAfterKill(); } - + // save m_tasks.SaveProgress(); Index: src/ch/MiniViewDlg.cpp =================================================================== diff -u -r449a5b399ab21ca0d06050b47b264f2f704af966 -r9352ed0c4fe447a36bc728640c307be6d41455fd --- src/ch/MiniViewDlg.cpp (.../MiniViewDlg.cpp) (revision 449a5b399ab21ca0d06050b47b264f2f704af966) +++ src/ch/MiniViewDlg.cpp (.../MiniViewDlg.cpp) (revision 9352ed0c4fe447a36bc728640c307be6d41455fd) @@ -181,9 +181,9 @@ if (GetConfig().get_bool(PP_MVSHOWSINGLETASKS)) { - for (int i=0;iGetSize();i++) + for(size_t stIndex = 0; stIndex < m_pTasks->GetSize(); ++stIndex) { - CTask* pTask=m_pTasks->GetAt(i); + CTask* pTask=m_pTasks->GetAt(stIndex); pTask->GetMiniSnapshot(&dd); if ((dd.m_uiStatus & ST_STEP_MASK) != ST_FINISHED && (dd.m_uiStatus & ST_STEP_MASK) != ST_CANCELLED) Index: src/ch/OptionsDlg.cpp =================================================================== diff -u -r07a3be49b0c7e5599eb89c2f9da9a9272cc1558a -r9352ed0c4fe447a36bc728640c307be6d41455fd --- src/ch/OptionsDlg.cpp (.../OptionsDlg.cpp) (revision 07a3be49b0c7e5599eb89c2f9da9a9272cc1558a) +++ src/ch/OptionsDlg.cpp (.../OptionsDlg.cpp) (revision 9352ed0c4fe447a36bc728640c307be6d41455fd) @@ -70,10 +70,10 @@ m_ctlProperties.AddString(text, ID_PROPERTY_COMBO_LIST, IDS_BOOLTEXT_STRING, (value)) #define PROP_UINT(text, value)\ - m_ctlProperties.AddString(text, ID_PROPERTY_TEXT, _itot((int)(value), m_szBuffer, 10), 0) + m_ctlProperties.AddString(text, ID_PROPERTY_TEXT, _itot(boost::numeric_cast((value)), m_szBuffer, 10), 0) #define PROP_COMBO(text, prop_text, value)\ - m_ctlProperties.AddString(text, ID_PROPERTY_COMBO_LIST, prop_text, (int)((value))) + m_ctlProperties.AddString(text, ID_PROPERTY_COMBO_LIST, prop_text, boost::numeric_cast((value))) #define PROP_DIR(text, prop_text, value)\ m_ctlProperties.AddString(text, ID_PROPERTY_DIR, (value)+CString(GetResManager().LoadString(prop_text)), 0) @@ -82,7 +82,7 @@ m_ctlProperties.AddString(text, ID_PROPERTY_PATH, (value)+CString(GetResManager().LoadString(prop_text)), 0) #define PROP_CUSTOM_UINT(text, value, callback, param)\ - m_ctlProperties.AddString(text, ID_PROPERTY_CUSTOM, CString(_itot((int)(value), m_szBuffer, 10)), callback, this, param, 0) + m_ctlProperties.AddString(text, ID_PROPERTY_CUSTOM, CString(_itot(boost::numeric_cast((value)), m_szBuffer, 10)), callback, this, param, 0) #define SKIP_SEPARATOR(pos)\ pos++ @@ -240,9 +240,9 @@ PROP_BOOL(IDS_CFG_UPDATE_CHECK_FOR_BETA, GetConfig().get_bool(PP_PUPDATE_CHECK_FOR_BETA)); PROP_BOOL(IDS_AUTOSHUTDOWN_STRING, GetConfig().get_bool(PP_PSHUTDOWNAFTREFINISHED)); PROP_UINT(IDS_SHUTDOWNTIME_STRING, GetConfig().get_signed_num(PP_PTIMEBEFORESHUTDOWN)); - PROP_COMBO(IDS_FORCESHUTDOWN_STRING, IDS_FORCESHUTDOWNVALUES_STRING, GetConfig().get_bool(PP_PFORCESHUTDOWN)); + PROP_COMBO(IDS_FORCESHUTDOWN_STRING, IDS_FORCESHUTDOWNVALUES_STRING, GetConfig().get_bool(PP_PFORCESHUTDOWN) ? 1 : 0); PROP_UINT(IDS_AUTOSAVEINTERVAL_STRING, GetConfig().get_signed_num(PP_PAUTOSAVEINTERVAL)); - PROP_COMBO(IDS_CFGPRIORITYCLASS_STRING, IDS_CFGPRIORITYCLASSITEMS_STRING, PriorityClassToIndex((int)GetConfig().get_signed_num(PP_PPROCESSPRIORITYCLASS))); + PROP_COMBO(IDS_CFGPRIORITYCLASS_STRING, IDS_CFGPRIORITYCLASSITEMS_STRING, PriorityClassToIndex(boost::numeric_cast(GetConfig().get_signed_num(PP_PPROCESSPRIORITYCLASS)))); PROP_DIR(IDS_TEMPFOLDER_STRING, IDS_TEMPFOLDERCHOOSE_STRING, strPath); // lang @@ -307,7 +307,7 @@ PROP_UINT(IDS_TIMEDDIALOGINTERVAL_STRING, GetConfig().get_signed_num(PP_CMFEEDBACKTIME)); PROP_BOOL(IDS_AUTORETRYONERROR_STRING, GetConfig().get_bool(PP_CMAUTORETRYONERROR)); PROP_UINT(IDS_AUTORETRYINTERVAL_STRING, GetConfig().get_signed_num(PP_CMAUTORETRYINTERVAL)); - PROP_COMBO(IDS_DEFAULTPRIORITY_STRING, MakeCompoundString(IDS_PRIORITY0_STRING, 7, _T("!")), PriorityToIndex((int)GetConfig().get_signed_num(PP_CMDEFAULTPRIORITY))); + PROP_COMBO(IDS_DEFAULTPRIORITY_STRING, MakeCompoundString(IDS_PRIORITY0_STRING, 7, _T("!")), PriorityToIndex(boost::numeric_cast(GetConfig().get_signed_num(PP_CMDEFAULTPRIORITY)))); PROP_BOOL(IDS_CFGDISABLEPRIORITYBOOST_STRING, GetConfig().get_bool(PP_CMDISABLEPRIORITYBOOST)); PROP_BOOL(IDS_DELETEAFTERFINISHED_STRING, GetConfig().get_bool(PP_CMDELETEAFTERFINISHED)); PROP_BOOL(IDS_CREATELOGFILES_STRING, GetConfig().get_bool(PP_CMCREATELOG)); Index: src/ch/ProgressListBox.cpp =================================================================== diff -u -r5057e08b0cc064972abeb94a488e5f12d9db14a0 -r9352ed0c4fe447a36bc728640c307be6d41455fd --- src/ch/ProgressListBox.cpp (.../ProgressListBox.cpp) (revision 5057e08b0cc064972abeb94a488e5f12d9db14a0) +++ src/ch/ProgressListBox.cpp (.../ProgressListBox.cpp) (revision 9352ed0c4fe447a36bc728640c307be6d41455fd) @@ -151,7 +151,7 @@ void CProgressListBox::RecalcHeight() { // new height - int iCtlHeight = (int)m_vItems.size() * GetItemHeight(0); + int iCtlHeight = boost::numeric_cast(m_vItems.size()) * GetItemHeight(0); // change control size CRect rcCtl; @@ -171,7 +171,7 @@ _PROGRESSITEM_* CProgressListBox::GetItemAddress(int iIndex) { - if (m_vItems.size() > iIndex) + if(boost::numeric_cast(m_vItems.size()) > iIndex) return m_vItems.at(iIndex); else { @@ -185,7 +185,7 @@ void CProgressListBox::UpdateItems(int nLimit, bool bUpdateSize) { // delete items from array - if(m_vItems.size() > nLimit) + if(boost::numeric_cast(m_vItems.size()) > nLimit) { std::vector<_PROGRESSITEM_*>::iterator iterStart = m_vItems.begin() + nLimit; for(std::vector<_PROGRESSITEM_*>::iterator iterPos = iterStart; iterPos != m_vItems.end(); ++iterPos) @@ -195,13 +195,13 @@ m_vItems.erase(iterStart, m_vItems.end()); } // change count of elements in a listbox - if (GetCount() != m_vItems.size()) + if(GetCount() != boost::numeric_cast(m_vItems.size())) { - while (GetCount() < m_vItems.size()) + while(GetCount() < boost::numeric_cast(m_vItems.size())) AddString(_T("")); - while (GetCount() > (int)m_vItems.size()) - DeleteString((UINT)m_vItems.size()); + while(GetCount() > boost::numeric_cast(m_vItems.size())) + DeleteString(boost::numeric_cast(m_vItems.size())); } if (bUpdateSize) Index: src/ch/PropertyListCtrl.cpp =================================================================== diff -u -r95e140c080a7424faba1bc9f35098e3cfd56d4e9 -r9352ed0c4fe447a36bc728640c307be6d41455fd --- src/ch/PropertyListCtrl.cpp (.../PropertyListCtrl.cpp) (revision 95e140c080a7424faba1bc9f35098e3cfd56d4e9) +++ src/ch/PropertyListCtrl.cpp (.../PropertyListCtrl.cpp) (revision 9352ed0c4fe447a36bc728640c307be6d41455fd) @@ -461,7 +461,7 @@ if(m_pCurItem->csProperties.GetSize() > 5) TempRect.bottom += GetItemHeight(0) * 5; else - TempRect.bottom += GetItemHeight(0) * (int)m_pCurItem->csProperties.GetSize(); + TempRect.bottom += GetItemHeight(0) * boost::numeric_cast(m_pCurItem->csProperties.GetSize()); // pobierz wsp�rz�dne tej kontrolki w stosunku do okna parenta // CRect rcThisParent; @@ -514,7 +514,7 @@ return; // Add it and select it - m_pCurItem->nPropertySelected = (int)m_pCurItem->csProperties.Add(csText); + m_pCurItem->nPropertySelected = boost::numeric_cast(m_pCurItem->csProperties.Add(csText)); } } void CPropertyListCtrl::OnEditChange() @@ -1017,7 +1017,7 @@ case ID_PROPERTY_FONT: if(m_pCurDrawItem->LogFont.lfHeight) - pDC->DrawText( m_pCurDrawItem->LogFont.lfFaceName, (int)_tcslen(m_pCurDrawItem->LogFont.lfFaceName), ItemRect, DT_SINGLELINE|DT_VCENTER|DT_LEFT|DT_NOPREFIX); + pDC->DrawText( m_pCurDrawItem->LogFont.lfFaceName, boost::numeric_cast(_tcslen(m_pCurDrawItem->LogFont.lfFaceName)), ItemRect, DT_SINGLELINE|DT_VCENTER|DT_LEFT|DT_NOPREFIX); break; } } Index: src/ch/RecentDlg.cpp =================================================================== diff -u -r68739164e349c34dcd0bcb36c6eb381f23cb8b77 -r9352ed0c4fe447a36bc728640c307be6d41455fd --- src/ch/RecentDlg.cpp (.../RecentDlg.cpp) (revision 68739164e349c34dcd0bcb36c6eb381f23cb8b77) +++ src/ch/RecentDlg.cpp (.../RecentDlg.cpp) (revision 9352ed0c4fe447a36bc728640c307be6d41455fd) @@ -97,11 +97,11 @@ m_ctlRecent.SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_ONECLICKACTIVATE | LVS_EX_INFOTIP | LVS_EX_UNDERLINEHOT); // update recent paths - for (int i=0;i<(int)m_cvRecent.size();i++) + for (size_t stIndex = 0; stIndex < m_cvRecent.size(); ++stIndex) { - sfi.iIcon=-1; - SHGetFileInfo(m_cvRecent.at(i), FILE_ATTRIBUTE_NORMAL, &sfi, sizeof(sfi), SHGFI_SYSICONINDEX | SHGFI_LARGEICON); - m_ctlRecent.InsertItem(i, m_cvRecent.at(i), sfi.iIcon); + sfi.iIcon = -1; + SHGetFileInfo(m_cvRecent.at(stIndex), FILE_ATTRIBUTE_NORMAL, &sfi, sizeof(sfi), SHGFI_SYSICONINDEX | SHGFI_LARGEICON); + m_ctlRecent.InsertItem(boost::numeric_cast(stIndex), m_cvRecent.at(stIndex), sfi.iIcon); } return TRUE; @@ -112,9 +112,9 @@ NM_LISTVIEW* plv = (NM_LISTVIEW*)pNMHDR; // current selection - if (plv->iItem >= 0 && plv->iItem < (int)m_cvRecent.size()) + if (plv->iItem >= 0 && plv->iItem < boost::numeric_cast(m_cvRecent.size())) { - m_strPath=m_cvRecent.at(plv->iItem); + m_strPath = m_cvRecent.at(plv->iItem); UpdateData(FALSE); } Index: src/ch/ReplacePathsDlg.cpp =================================================================== diff -u -r17059054c69cd5726f4c7d35357f3b9556471783 -r9352ed0c4fe447a36bc728640c307be6d41455fd --- src/ch/ReplacePathsDlg.cpp (.../ReplacePathsDlg.cpp) (revision 17059054c69cd5726f4c7d35357f3b9556471783) +++ src/ch/ReplacePathsDlg.cpp (.../ReplacePathsDlg.cpp) (revision 9352ed0c4fe447a36bc728640c307be6d41455fd) @@ -82,8 +82,10 @@ InitializeResizableControls(); - for (int i=0;iGetClipboardDataSize();i++) - m_ctlPathsList.AddString(m_pTask->GetClipboardData(i)->GetPath()); + for(size_t stIndex = 0; stIndex < m_pTask->GetClipboardDataSize(); ++stIndex) + { + m_ctlPathsList.AddString(m_pTask->GetClipboardData(stIndex)->GetPath()); + } return TRUE; } Index: src/ch/ShortcutsDlg.cpp =================================================================== diff -u -r68739164e349c34dcd0bcb36c6eb381f23cb8b77 -r9352ed0c4fe447a36bc728640c307be6d41455fd --- src/ch/ShortcutsDlg.cpp (.../ShortcutsDlg.cpp) (revision 68739164e349c34dcd0bcb36c6eb381f23cb8b77) +++ src/ch/ShortcutsDlg.cpp (.../ShortcutsDlg.cpp) (revision 9352ed0c4fe447a36bc728640c307be6d41455fd) @@ -109,13 +109,13 @@ COMBOBOXEXITEM cbi; cbi.mask=CBEIF_IMAGE | CBEIF_TEXT; - for (int i=0;i<(int)m_pcvRecent->size();i++) + for(size_t stIndex = 0; stIndex < m_pcvRecent->size(); ++stIndex) { - cbi.iItem=i; - cbi.pszText=m_pcvRecent->at(i); - sfi.iIcon=-1; + cbi.iItem = stIndex; + cbi.pszText = m_pcvRecent->at(stIndex); + sfi.iIcon = -1; SHGetFileInfo(cbi.pszText, FILE_ATTRIBUTE_NORMAL, &sfi, sizeof(SHFILEINFO), SHGFI_SYSICONINDEX | SHGFI_SMALLICON); - cbi.iImage=sfi.iIcon; + cbi.iImage = sfi.iIcon; m_ctlPath.InsertItem(&cbi); } @@ -137,13 +137,13 @@ // update shortcut list CShortcut sc; - for (int i=0;i<(int)m_cvShortcuts.size();i++) + for(size_t stIndex = 0; stIndex < m_cvShortcuts.size(); ++stIndex) { - sc=CString(m_cvShortcuts.at(i)); - sfi.iIcon=-1; + sc = CString(m_cvShortcuts.at(stIndex)); + sfi.iIcon = -1; SHGetFileInfo(sc.m_strPath, FILE_ATTRIBUTE_NORMAL, &sfi, sizeof(sfi), SHGFI_SYSICONINDEX | SHGFI_LARGEICON); - m_ctlShortcuts.InsertItem(i, sc.m_strName, sfi.iIcon); - m_ctlShortcuts.SetItem(i, 1, LVIF_TEXT, sc.m_strPath, 0, 0, 0, 0); + m_ctlShortcuts.InsertItem(boost::numeric_cast(stIndex), sc.m_strName, sfi.iIcon); + m_ctlShortcuts.SetItem(boost::numeric_cast(stIndex), 1, LVIF_TEXT, sc.m_strPath, 0, 0, 0, 0); } return TRUE; @@ -154,7 +154,7 @@ NM_LISTVIEW* plv = (NM_LISTVIEW*)pNMHDR; // current selection - if (plv->iItem >= 0 && plv->iItem < (int)m_cvShortcuts.size()) + if (plv->iItem >= 0 && plv->iItem < boost::numeric_cast(m_cvShortcuts.size())) { CShortcut sc(CString(m_cvShortcuts.at(plv->iItem))); m_strName=sc.m_strName; @@ -248,8 +248,8 @@ SHFILEINFO sfi; sfi.iIcon=-1; SHGetFileInfo(sc.m_strPath, FILE_ATTRIBUTE_NORMAL, &sfi, sizeof(sfi), SHGFI_SYSICONINDEX | SHGFI_LARGEICON); - m_ctlShortcuts.InsertItem((UINT)m_cvShortcuts.size() - 1, sc.m_strName, sfi.iIcon); - m_ctlShortcuts.SetItem((int)m_cvShortcuts.size() - 1, 1, LVIF_TEXT, sc.m_strPath, 0, 0, 0, 0); + m_ctlShortcuts.InsertItem(boost::numeric_cast(m_cvShortcuts.size() - 1), sc.m_strName, sfi.iIcon); + m_ctlShortcuts.SetItem(boost::numeric_cast(m_cvShortcuts.size() - 1), 1, LVIF_TEXT, sc.m_strPath, 0, 0, 0, 0); } void CShortcutsDlg::OnChangeButton() Index: src/ch/StaticEx.cpp =================================================================== diff -u -r3ff3695cd69ad4482cf22fb0bb77e120ef6f5106 -r9352ed0c4fe447a36bc728640c307be6d41455fd --- src/ch/StaticEx.cpp (.../StaticEx.cpp) (revision 3ff3695cd69ad4482cf22fb0bb77e120ef6f5106) +++ src/ch/StaticEx.cpp (.../StaticEx.cpp) (revision 9352ed0c4fe447a36bc728640c307be6d41455fd) @@ -314,7 +314,7 @@ // wParam - count // lParam - addr of a buffer if (pSettings->pszLink) - _tcsncpy((PTSTR)lParam, pSettings->pszLink, (int)wParam); + _tcsncpy((PTSTR)lParam, pSettings->pszLink, boost::numeric_cast(wParam)); else _tcscpy((PTSTR)lParam, _T("")); Index: src/ch/StatusDlg.cpp =================================================================== diff -u -r5057e08b0cc064972abeb94a488e5f12d9db14a0 -r9352ed0c4fe447a36bc728640c307be6d41455fd --- src/ch/StatusDlg.cpp (.../StatusDlg.cpp) (revision 5057e08b0cc064972abeb94a488e5f12d9db14a0) +++ src/ch/StatusDlg.cpp (.../StatusDlg.cpp) (revision 9352ed0c4fe447a36bc728640c307be6d41455fd) @@ -161,16 +161,16 @@ RefreshStatus(); // select needed element - int i=0; - while (i < m_pTasks->GetSize()) + size_t stIndex = 0; + while(stIndex < m_pTasks->GetSize()) { - if (m_pTasks->GetAt(i) == m_pInitialSelection) + if(m_pTasks->GetAt(stIndex) == m_pInitialSelection) { - m_ctlStatusList.SetItemState(i, LVIS_SELECTED, LVIS_SELECTED); + m_ctlStatusList.SetItemState(boost::numeric_cast(stIndex), LVIS_SELECTED, LVIS_SELECTED); break; } - i++; + stIndex++; }; // refresh data timer @@ -735,13 +735,15 @@ // current time DWORD dwCurrentTime=GetTickCount(); - + // get rid of item after the current part - m_ctlStatusList.LimitItems((int)m_pTasks->GetSize()); - + m_ctlStatusList.LimitItems(boost::numeric_cast(m_pTasks->GetSize())); + // add task info - for (int i=0;iGetSize();i++) - AddTaskInfo(i, m_pTasks->GetAt(i), dwCurrentTime); + for(size_t stIndex = 0; stIndex < m_pTasks->GetSize(); ++stIndex) + { + AddTaskInfo(boost::numeric_cast(stIndex), m_pTasks->GetAt(stIndex), dwCurrentTime); + } // percent int nPercent=m_pTasks->GetPercent(); Index: src/ch/Stdafx.h =================================================================== diff -u -r5057e08b0cc064972abeb94a488e5f12d9db14a0 -r9352ed0c4fe447a36bc728640c307be6d41455fd --- src/ch/Stdafx.h (.../Stdafx.h) (revision 5057e08b0cc064972abeb94a488e5f12d9db14a0) +++ src/ch/Stdafx.h (.../Stdafx.h) (revision 9352ed0c4fe447a36bc728640c307be6d41455fd) @@ -34,6 +34,8 @@ #include +#include + #pragma warning (disable: 4711) #include "debug.h" #include "../libicpf/file.h" Index: src/ch/ch.vc90.vcproj =================================================================== diff -u -r5057e08b0cc064972abeb94a488e5f12d9db14a0 -r9352ed0c4fe447a36bc728640c307be6d41455fd --- src/ch/ch.vc90.vcproj (.../ch.vc90.vcproj) (revision 5057e08b0cc064972abeb94a488e5f12d9db14a0) +++ src/ch/ch.vc90.vcproj (.../ch.vc90.vcproj) (revision 9352ed0c4fe447a36bc728640c307be6d41455fd) @@ -1,7 +1,7 @@ @@ -153,6 +154,7 @@ ProgramDataBaseFileName="$(IntDir)\$(TargetName)_vs90.pdb" BrowseInformation="0" WarningLevel="4" + WarnAsError="true" SuppressStartupBanner="true" DebugInformationFormat="3" /> @@ -246,6 +248,7 @@ ProgramDataBaseFileName="$(IntDir)\$(TargetName)_vs90.pdb" BrowseInformation="0" WarningLevel="4" + WarnAsError="true" SuppressStartupBanner="true" DebugInformationFormat="3" /> @@ -339,6 +342,7 @@ ProgramDataBaseFileName="$(IntDir)\$(TargetName)_vs90.pdb" BrowseInformation="0" WarningLevel="4" + WarnAsError="true" SuppressStartupBanner="true" DebugInformationFormat="3" /> Index: src/ch/task.cpp =================================================================== diff -u -r5057e08b0cc064972abeb94a488e5f12d9db14a0 -r9352ed0c4fe447a36bc728640c307be6d41455fd --- src/ch/task.cpp (.../task.cpp) (revision 5057e08b0cc064972abeb94a488e5f12d9db14a0) +++ src/ch/task.cpp (.../task.cpp) (revision 9352ed0c4fe447a36bc728640c307be6d41455fd) @@ -147,9 +147,9 @@ int iOffset; int iCount=0; m_cs.Lock(); - for (int i=0;iGetPath(); strText.MakeLower(); iOffset=strText.Find(strOld, 0); @@ -408,9 +408,9 @@ else m_nProcessed+=m_ucCurrentCopy*m_nAll; - for (int i=0;iSetKillFlag(); // send an info about finishing + for(size_t stIndex = 0; stIndex < GetSize(); ++stIndex) + { + GetAt(stIndex)->SetKillFlag(); // send an info about finishing + } // wait for finishing and get rid of it - for (int i=0;iGetKilledFlag()) + while(!pTask->GetKilledFlag()) Sleep(10); pTask->CleanupAfterKill(); @@ -1309,9 +1311,9 @@ void CTaskArray::RemoveFinished(CTask** pSelTask) { m_cs.Lock(); - for (int i=0;iGetStatus(ST_STEP_MASK) == ST_FINISHED || pTask->GetStatus(ST_STEP_MASK) == ST_CANCELLED)) { @@ -1327,7 +1329,7 @@ // delete data delete pTask; - static_cast*>(this)->RemoveAt(i); + static_cast*>(this)->RemoveAt(stIndex); m_cs.Unlock(); return; @@ -1396,34 +1398,36 @@ void CTaskArray::TasksBeginProcessing() { - for (int i=0;iBeginProcessing(); + for(size_t stIndex = 0; stIndex < GetSize(); ++stIndex) + { + GetAt(stIndex)->BeginProcessing(); + } } void CTaskArray::TasksPauseProcessing() { - for (int i=0;iPauseProcessing(); + for(size_t stIndex = 0; stIndex < GetSize(); ++stIndex) + GetAt(stIndex)->PauseProcessing(); } void CTaskArray::TasksResumeProcessing() { - for (int i=0;iResumeProcessing(); + for(size_t stIndex = 0; stIndex < GetSize(); ++stIndex) + GetAt(stIndex)->ResumeProcessing(); } void CTaskArray::TasksRestartProcessing() { - for (int i=0;iRestartProcessing(); + for(size_t stIndex = 0; stIndex < GetSize(); ++stIndex) + GetAt(stIndex)->RestartProcessing(); } bool CTaskArray::TasksRetryProcessing(bool bOnlyErrors/*=false*/, UINT uiInterval) { bool bChanged=false; - for (int i=0;iRetryProcessing(bOnlyErrors, uiInterval)) + if (GetAt(stIndex)->RetryProcessing(bOnlyErrors, uiInterval)) bChanged=true; } @@ -1432,8 +1436,8 @@ void CTaskArray::TasksCancelProcessing() { - for (int i=0;iCancelProcessing(); + for(size_t stIndex = 0; stIndex < GetSize(); ++stIndex) + GetAt(stIndex)->CancelProcessing(); } ull_t CTaskArray::GetPosition() @@ -1488,9 +1492,9 @@ bFlag=false; else { - for (int i=0;iGetStatus(); + uiStatus=GetAt(stIndex)->GetStatus(); bFlag=((uiStatus & ST_STEP_MASK) == ST_FINISHED || (uiStatus & ST_STEP_MASK) == ST_CANCELLED || (uiStatus & ST_WORKING_MASK) == ST_PAUSED || ((uiStatus & ST_WORKING_MASK) == ST_ERROR && !GetConfig().get_bool(PP_CMAUTORETRYONERROR))); @@ -2508,10 +2512,21 @@ } } +int CTask::OnBeginTask() +{ + return rand(); +} + +int CTask::OnEndTask(int i) +{ + return i + 2; +} + UINT CTask::ThrdProc(LPVOID pParam) { TRACE("\n\nENTERING ThrdProc (new task started)...\n"); CTask* pTask=static_cast(pParam); + pTask->OnBeginTask(); chcore::IFeedbackHandler* piFeedbackHandler = pTask->GetFeedbackHandler(); tstring_t strPath = pTask->GetTaskPath(); @@ -2719,6 +2734,8 @@ return 0xffffffff; // almost like -1 } + pTask->OnEndTask(7); + TRACE("TASK FINISHED - exiting ThrdProc.\n"); return 0; } Index: src/ch/task.h =================================================================== diff -u -r5057e08b0cc064972abeb94a488e5f12d9db14a0 -r9352ed0c4fe447a36bc728640c307be6d41455fd --- src/ch/task.h (.../task.h) (revision 5057e08b0cc064972abeb94a488e5f12d9db14a0) +++ src/ch/task.h (.../task.h) (revision 9352ed0c4fe447a36bc728640c307be6d41455fd) @@ -143,6 +143,10 @@ CTask(chcore::IFeedbackHandler* piFeedbackHandler, const TASK_CREATE_DATA *pCreateData); ~CTask(); + int OnBeginTask(); + int OnEndTask(int i); + + // m_clipboard void AddClipboardData(const CClipboardEntryPtr& spEntry); CClipboardEntryPtr GetClipboardData(size_t stIndex); Index: src/chext/DropMenuExt.cpp =================================================================== diff -u -r17059054c69cd5726f4c7d35357f3b9556471783 -r9352ed0c4fe447a36bc728640c307be6d41455fd --- src/chext/DropMenuExt.cpp (.../DropMenuExt.cpp) (revision 17059054c69cd5726f4c7d35357f3b9556471783) +++ src/chext/DropMenuExt.cpp (.../DropMenuExt.cpp) (revision 9352ed0c4fe447a36bc728640c307be6d41455fd) @@ -276,6 +276,7 @@ STDMETHODIMP CDropMenuExt::HandleMenuMsg2(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT* /*plResult*/) { + uMsg; wParam; lParam; ATLTRACE(_T("CDropMenuExt::HandleMenuMsg2(): uMsg = %lu, wParam = %lu, lParam = %lu\n"), uMsg, wParam, lParam); return S_FALSE; } Index: src/chext/chext.vc90.vcproj =================================================================== diff -u -r0373359eff650e8cf04a5992711ef9f20347536f -r9352ed0c4fe447a36bc728640c307be6d41455fd --- src/chext/chext.vc90.vcproj (.../chext.vc90.vcproj) (revision 0373359eff650e8cf04a5992711ef9f20347536f) +++ src/chext/chext.vc90.vcproj (.../chext.vc90.vcproj) (revision 9352ed0c4fe447a36bc728640c307be6d41455fd) @@ -55,6 +55,7 @@ ProgramDataBaseFileName="$(IntDir)\$(TargetName)_vs90.pdb" BrowseInformation="0" WarningLevel="4" + WarnAsError="true" SuppressStartupBanner="true" DebugInformationFormat="4" /> @@ -143,6 +144,7 @@ ProgramDataBaseFileName="$(IntDir)\$(TargetName)_vs90.pdb" BrowseInformation="0" WarningLevel="4" + WarnAsError="true" SuppressStartupBanner="true" DebugInformationFormat="3" /> @@ -232,6 +234,7 @@ ProgramDataBaseFileName="$(IntDir)\$(TargetName)_vs90.pdb" BrowseInformation="0" WarningLevel="4" + WarnAsError="true" SuppressStartupBanner="true" DebugInformationFormat="3" /> @@ -322,6 +325,7 @@ ProgramDataBaseFileName="$(IntDir)\$(TargetName)_vs90.pdb" BrowseInformation="0" WarningLevel="4" + WarnAsError="true" SuppressStartupBanner="true" DebugInformationFormat="3" /> Index: src/libchcore/libchcore.vc90.vcproj =================================================================== diff -u -r39db7f4bffdd185122d8dab0772bd6fc49a0b675 -r9352ed0c4fe447a36bc728640c307be6d41455fd --- src/libchcore/libchcore.vc90.vcproj (.../libchcore.vc90.vcproj) (revision 39db7f4bffdd185122d8dab0772bd6fc49a0b675) +++ src/libchcore/libchcore.vc90.vcproj (.../libchcore.vc90.vcproj) (revision 9352ed0c4fe447a36bc728640c307be6d41455fd) @@ -51,6 +51,7 @@ RuntimeLibrary="3" UsePrecompiledHeader="2" WarningLevel="4" + WarnAsError="true" DebugInformationFormat="4" />