[commit] r2684 - in trunk/GME: Console Core GMEActiveBrowser Gme Meta Mga MgaUtil Search
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Tue Jul 18 13:19:54 CDT 2017
Author: ksmyth
Date: Tue Jul 18 13:19:54 2017
New Revision: 2684
Log:
Fix errors found by static analysis
Modified:
trunk/GME/Console/HtmlCtrl.h
trunk/GME/Core/CoreAttribute.cpp
trunk/GME/GMEActiveBrowser/ActiveBrowserPropertyPage.cpp
trunk/GME/GMEActiveBrowser/AggregateTreeCtrl.cpp
trunk/GME/Gme/GMEApp.cpp
trunk/GME/Gme/GMEOLEApp.cpp
trunk/GME/Gme/GMEPanningWindow.cpp
trunk/GME/Gme/GMEView.cpp
trunk/GME/Gme/GMEViewOverlay.cpp
trunk/GME/Gme/GUIObject.cpp
trunk/GME/Gme/MainFrm.cpp
trunk/GME/Meta/MgaMetaProject.cpp
trunk/GME/Mga/MgaComplexOps.cpp
trunk/GME/Mga/MgaFCO.cpp
trunk/GME/Mga/MgaFilter.cpp
trunk/GME/MgaUtil/AnnotationNode.cpp
trunk/GME/MgaUtil/GmeDlg.cpp
trunk/GME/MgaUtil/MgaRegistrar.cpp
trunk/GME/MgaUtil/MgaResolver.cpp
trunk/GME/Search/Input.cpp
trunk/GME/Search/SearchAlg.cpp
Modified: trunk/GME/Console/HtmlCtrl.h
==============================================================================
--- trunk/GME/Console/HtmlCtrl.h Mon Jun 26 11:06:56 2017 (r2683)
+++ trunk/GME/Console/HtmlCtrl.h Tue Jul 18 13:19:54 2017 (r2684)
@@ -65,8 +65,6 @@
virtual void Dump(CDumpContext& dc) const;
#endif
- const CConsoleCtl *m_control;
-
// Generated message map functions
//{{AFX_MSG(CHtmlCtrl)
afx_msg void OnDestroy();
Modified: trunk/GME/Core/CoreAttribute.cpp
==============================================================================
--- trunk/GME/Core/CoreAttribute.cpp Mon Jun 26 11:06:56 2017 (r2683)
+++ trunk/GME/Core/CoreAttribute.cpp Tue Jul 18 13:19:54 2017 (r2684)
@@ -271,7 +271,6 @@
others_lockval = 0;
read_count = 0;
write_count = 0;
- others_lockval = 0;
}
#ifdef _DEBUG
Modified: trunk/GME/GMEActiveBrowser/ActiveBrowserPropertyPage.cpp
==============================================================================
--- trunk/GME/GMEActiveBrowser/ActiveBrowserPropertyPage.cpp Mon Jun 26 11:06:56 2017 (r2683)
+++ trunk/GME/GMEActiveBrowser/ActiveBrowserPropertyPage.cpp Tue Jul 18 13:19:54 2017 (r2684)
@@ -52,7 +52,8 @@
m_ComboEditCtrl (&m_ComboSearchCtrl),
m_ComboSearchCtrl (&m_TreeAggregate),
m_bProjectOpen (FALSE),
- m_SearchButtonCtrlBitmap(NULL)
+ m_SearchButtonCtrlBitmap(NULL),
+ m_parent(NULL)
{
//{{AFX_DATA_INIT(CAggregatePropertyPage)
//}}AFX_DATA_INIT
@@ -1582,20 +1583,20 @@
if (pMgaContext) {
constrMgr = pMgaContext->FindConstraintManager();
if (constrMgr)
- COMTHROW(constrMgr->Enable(false));
+ COMTHROW(constrMgr->Enable(VARIANT_FALSE));
if (pMgaContext->m_ccpProject)
COMTHROW(pMgaContext->m_ccpProject->Notify(APPEVENT_LIB_ATTACH_BEGIN));
}
pMgaContext->BeginTransaction(TRANSACTION_NON_NESTED);
- COMTHROW(ccpFolder->AttachLibraryV3( CComBSTR( dlg.m_strConnString), dlg.m_bOptimized, NULL));
+ COMTHROW(ccpFolder->AttachLibraryV3( CComBSTR( dlg.m_strConnString), dlg.m_bOptimized ? VARIANT_TRUE : VARIANT_FALSE, NULL));
pMgaContext->CommitTransaction();
// toggle back Constraint Manager (done only after commit, so that it will not catch the events happened in the transaction)
if (pMgaContext) {
if (constrMgr)
- COMTHROW(constrMgr->Enable(true));
+ COMTHROW(constrMgr->Enable(VARIANT_TRUE));
if(pMgaContext->m_ccpProject)
COMTHROW(pMgaContext->m_ccpProject->Notify(APPEVENT_LIB_ATTACH_END));
}
@@ -1669,9 +1670,9 @@
long errs;
if (dlg.relativePath != "") {
- COMTHROW(ccpFolder->RefreshLibraryV3( CComBSTR( dlg.relativePath), dlg.m_bOptimized, &errs) );
+ COMTHROW(ccpFolder->RefreshLibraryV3( CComBSTR( dlg.relativePath), dlg.m_bOptimized ? VARIANT_TRUE : VARIANT_FALSE, &errs) );
} else {
- COMTHROW(ccpFolder->RefreshLibraryV3( CComBSTR( dlg.m_strConnString), dlg.m_bOptimized, &errs) );
+ COMTHROW(ccpFolder->RefreshLibraryV3( CComBSTR( dlg.m_strConnString), dlg.m_bOptimized ? VARIANT_TRUE : VARIANT_FALSE, &errs) );
}
ccpFolder.Release();
pMgaContext->CommitTransaction();
Modified: trunk/GME/GMEActiveBrowser/AggregateTreeCtrl.cpp
==============================================================================
--- trunk/GME/GMEActiveBrowser/AggregateTreeCtrl.cpp Mon Jun 26 11:06:56 2017 (r2683)
+++ trunk/GME/GMEActiveBrowser/AggregateTreeCtrl.cpp Tue Jul 18 13:19:54 2017 (r2684)
@@ -505,6 +505,7 @@
return lRelID1 - lRelID2;
}
}
+ return 0;
}
@@ -1149,10 +1150,10 @@
if (pMgaContext)
constrMgr = pMgaContext->FindConstraintManager();
if (constrMgr)
- COMTHROW(constrMgr->Enable(false));
+ COMTHROW(constrMgr->Enable(VARIANT_FALSE));
BOOL res = DoDrop( doDragOp, pDataObject, point);
if (constrMgr) {
- COMTHROW(constrMgr->Enable(true));
+ COMTHROW(constrMgr->Enable(VARIANT_TRUE));
// constrMgr.Release();
}
Modified: trunk/GME/Gme/GMEApp.cpp
==============================================================================
--- trunk/GME/Gme/GMEApp.cpp Mon Jun 26 11:06:56 2017 (r2683)
+++ trunk/GME/Gme/GMEApp.cpp Tue Jul 18 13:19:54 2017 (r2684)
@@ -2385,7 +2385,7 @@
//UpdateProjectName(); // moved below
CWaitCursor wait;
- if(mgaConstMgr) COMTHROW(mgaConstMgr->Enable(false));
+ if(mgaConstMgr) COMTHROW(mgaConstMgr->Enable(VARIANT_FALSE));
CString file_name = fullPath;
if( CMainFrame::theInstance) CMainFrame::theInstance->m_console.Message( CString( _T("Importing ")) + file_name + _T("..."), 1);
@@ -2408,7 +2408,7 @@
AfxMessageBox(fullPath + _T(" was successfully imported."));
if (mgaConstMgr)
- COMTHROW(mgaConstMgr->Enable(true));
+ COMTHROW(mgaConstMgr->Enable(VARIANT_TRUE));
HRESULT hr = mgaProject->Notify(GLOBALEVENT_OPEN_PROJECT_FINISHED);
ASSERT(SUCCEEDED(hr));
}
@@ -2507,7 +2507,7 @@
CComPtr<IMgaParser> parser;
COMTHROW( parser.CoCreateInstance(L"Mga.MgaParser") );
ASSERT( parser != NULL );
- if(mgaConstMgr) COMTHROW(mgaConstMgr->Enable(false));
+ if(mgaConstMgr) COMTHROW(mgaConstMgr->Enable(VARIANT_FALSE));
IMgaParser2Ptr parser2 = (IMgaParser*)parser;
if (parser2 && m_pMainWnd)
COMTHROW(parser2->ParseProject2(mgaProject,PutInBstr(CString(xmlname)), (ULONGLONG)(m_pMainWnd->GetSafeHwnd())));
@@ -2540,7 +2540,7 @@
}
}
- if (mgaConstMgr) COMTHROW(mgaConstMgr->Enable(true));
+ if (mgaConstMgr) COMTHROW(mgaConstMgr->Enable(VARIANT_TRUE));
}
Modified: trunk/GME/Gme/GMEOLEApp.cpp
==============================================================================
--- trunk/GME/Gme/GMEOLEApp.cpp Mon Jun 26 11:06:56 2017 (r2683)
+++ trunk/GME/Gme/GMEOLEApp.cpp Tue Jul 18 13:19:54 2017 (r2684)
@@ -293,7 +293,7 @@
COMTHROW( parser.CoCreateInstance(L"Mga.MgaParser") );
ASSERT( parser != NULL );
- if(theApp.mgaConstMgr) COMTHROW(theApp.mgaConstMgr->Enable(false));
+ if(theApp.mgaConstMgr) COMTHROW(theApp.mgaConstMgr->Enable(VARIANT_FALSE));
IMgaParser2Ptr parser2 = (IMgaParser*)parser;
if (parser2 && theApp.m_pMainWnd)
@@ -305,7 +305,7 @@
catch (hresult_exception &){
}
- if (theApp.mgaConstMgr) COMTHROW(theApp.mgaConstMgr->Enable(true));
+ if (theApp.mgaConstMgr) COMTHROW(theApp.mgaConstMgr->Enable(VARIANT_TRUE));
}
void CGMEOLEApp::ConstraintsDialog()
Modified: trunk/GME/Gme/GMEPanningWindow.cpp
==============================================================================
--- trunk/GME/Gme/GMEPanningWindow.cpp Mon Jun 26 11:06:56 2017 (r2683)
+++ trunk/GME/Gme/GMEPanningWindow.cpp Tue Jul 18 13:19:54 2017 (r2684)
@@ -67,7 +67,7 @@
void CGMEPanningWindow::OnSize(UINT nType, int cx, int cy)
{
- cx = cy = 100;
+ // cx = cy = 100;
CDockablePane::OnSize(nType, cx, cy);
CRect rc;
Modified: trunk/GME/Gme/GMEView.cpp
==============================================================================
--- trunk/GME/Gme/GMEView.cpp Mon Jun 26 11:06:56 2017 (r2683)
+++ trunk/GME/Gme/GMEView.cpp Tue Jul 18 13:19:54 2017 (r2684)
@@ -1338,21 +1338,18 @@
{
// change the PrintDialog to a customized one
CGmePrintDialog *gpd = new CGmePrintDialog(this, guiMeta, FALSE);
- if (gpd && pInfo->m_pPD)
+ if (pInfo->m_pPD)
delete pInfo->m_pPD;
- if (gpd)
- {
- pInfo->m_pPD = gpd;
- pInfo->m_pPD->m_pd.Flags = PD_ALLPAGES | // actually the current aspect
- PD_ENABLEPRINTTEMPLATE | PD_NONETWORKBUTTON |
- PD_USEDEVMODECOPIES | PD_USEDEVMODECOPIESANDCOLLATE |
- PD_ENABLEPRINTHOOK | PD_ENABLESETUPHOOK |
- PD_RETURNDC ;
- pInfo->m_pPD->m_pd.nMinPage = 1; // one based page numbers
- pInfo->m_pPD->m_pd.nMaxPage = 0xffff; // how many pages is unknown
- pInfo->m_pPD->m_pd.hInstance = AfxGetInstanceHandle();
- pInfo->m_pPD->m_pd.lpPrintTemplateName = MAKEINTRESOURCE(IDD_PRINT_DIALOG);
- }
+ pInfo->m_pPD = gpd;
+ pInfo->m_pPD->m_pd.Flags = PD_ALLPAGES | // actually the current aspect
+ PD_ENABLEPRINTTEMPLATE | PD_NONETWORKBUTTON |
+ PD_USEDEVMODECOPIES | PD_USEDEVMODECOPIESANDCOLLATE |
+ PD_ENABLEPRINTHOOK | PD_ENABLESETUPHOOK |
+ PD_RETURNDC ;
+ pInfo->m_pPD->m_pd.nMinPage = 1; // one based page numbers
+ pInfo->m_pPD->m_pd.nMaxPage = 0xffff; // how many pages is unknown
+ pInfo->m_pPD->m_pd.hInstance = AfxGetInstanceHandle();
+ pInfo->m_pPD->m_pd.lpPrintTemplateName = MAKEINTRESOURCE(IDD_PRINT_DIALOG);
if (!CScrollZoomView::DoPreparePrinting(pInfo))
return FALSE;
@@ -3623,9 +3620,9 @@
}
else if( CGMEDataSource::IsXMLDataAvailable(pDataObject) )
{
- if( closure && theApp.mgaConstMgr) theApp.mgaConstMgr->Enable( false); // if closure is inserted disable the constraint manager ...
+ if( closure && theApp.mgaConstMgr) theApp.mgaConstMgr->Enable(VARIANT_FALSE); // if closure is inserted disable the constraint manager ...
ok = CGMEDataSource::ParseXMLData(pDataObject, currentModel, merge);
- if( closure && theApp.mgaConstMgr) theApp.mgaConstMgr->Enable( true); // ... and enable it after done
+ if( closure && theApp.mgaConstMgr) theApp.mgaConstMgr->Enable(VARIANT_TRUE); // ... and enable it after done
}
else
AfxThrowNotSupportedException();
@@ -9273,7 +9270,7 @@
HRESULT hr = launcher->AnnotationBrowser(fco, focus);
if (hr == E_MGA_MUST_ABORT) { // JIRA GME-236 special ret code, indicating that the dialog was cancelled
throw hresult_exception(S_OK);
- } if (FAILED(hr)) {
+ } else if (FAILED(hr)) {
ASSERT((_T("COMTHROW: Throwing HRESULT exception. Press IGNORE"), false));
throw hresult_exception(hr);
} else {
Modified: trunk/GME/Gme/GMEViewOverlay.cpp
==============================================================================
--- trunk/GME/Gme/GMEViewOverlay.cpp Mon Jun 26 11:06:56 2017 (r2683)
+++ trunk/GME/Gme/GMEViewOverlay.cpp Tue Jul 18 13:19:54 2017 (r2684)
@@ -213,7 +213,6 @@
blend.BlendOp = AC_SRC_OVER;
blend.BlendFlags = 0;
blend.SourceConstantAlpha = opacities[m_opacity];
- blend.AlphaFormat = 0;
blend.AlphaFormat = AC_SRC_ALPHA;
VERIFY(UpdateLayeredWindow(NULL, NULL, NULL, NULL, NULL, 0, &blend, ULW_ALPHA));
Modified: trunk/GME/Gme/GUIObject.cpp
==============================================================================
--- trunk/GME/Gme/GUIObject.cpp Mon Jun 26 11:06:56 2017 (r2683)
+++ trunk/GME/Gme/GUIObject.cpp Tue Jul 18 13:19:54 2017 (r2684)
@@ -79,11 +79,11 @@
CGuiAspect::~CGuiAspect()
{
if (newDecorator) {
- COMTHROW(newDecorator->Destroy());
+ newDecorator->Destroy();
newDecorator.Release();
newDecorator = NULL;
} else {
- COMTHROW(decorator->Destroy());
+ decorator->Destroy();
}
decorator.Release();
decorator = NULL;
@@ -1351,7 +1351,7 @@
return CSize(sizex, sizey);
}
catch (hresult_exception &) {
- return false;
+ return CSize(0, 0);
}
//return true;// unreachable code
}
@@ -2656,7 +2656,7 @@
} else if (dst_err) {
GiveConnectionEndErroMessage(_T("Destination endpoint error"), _T("dst"), srcPort);
}
- } else
+ } else // FIXME?
if (visible[parentAspect]) {
if( !srcPort->outConns.Find( this)) // WAS: outConns.AddTail(this); and as a result as aspects have cycled the collection got bigger and bigger
@@ -3053,7 +3053,7 @@
if (isPartFixed2) {
connectionMoveMethod = HorizontalEdgeMove;
isPartFixed2 = false;
- }
+ } // FIXME else ?
isPartFixed2 = AdjustCoordLimits(points, i + 1, i >= numEdges - 2, true, nextPos,
nextPt.x, last.x, xMinLimit, xMaxLimit);
if (checkPointOnEdge)
@@ -3072,7 +3072,7 @@
if (isPartFixed2) {
connectionMoveMethod = VerticalEdgeMove;
isPartFixed2 = false;
- }
+ } // FIXME else?
isPartFixed2 = AdjustCoordLimits(points, i + 1, i >= numEdges - 2, false, nextPos,
nextPt.y, last.y, yMinLimit, yMaxLimit);
if (checkPointOnEdge)
Modified: trunk/GME/Gme/MainFrm.cpp
==============================================================================
--- trunk/GME/Gme/MainFrm.cpp Mon Jun 26 11:06:56 2017 (r2683)
+++ trunk/GME/Gme/MainFrm.cpp Tue Jul 18 13:19:54 2017 (r2684)
@@ -901,6 +901,8 @@
#if defined(ACTIVEXGMEVIEW)
CGMEChildFrame* pView = (CGMEChildFrame*) pDocument->GetNextView(pos);
pView->SetMetaModel(meta);
+#else
+ break;
#endif
}
}
@@ -915,6 +917,8 @@
#if defined(ACTIVEXGMEVIEW)
CGMEChildFrame* pView = (CGMEChildFrame*) pDocument->GetNextView(pos);
pView->ChangeAspect(ind);
+#else
+ break;
#endif
}
}
@@ -929,6 +933,8 @@
#if defined(ACTIVEXGMEVIEW)
CGMEChildFrame* pView = (CGMEChildFrame*) pDocument->GetNextView(pos);
pView->CycleAspect();
+#else
+ break;
#endif
}
}
Modified: trunk/GME/Meta/MgaMetaProject.cpp
==============================================================================
--- trunk/GME/Meta/MgaMetaProject.cpp Mon Jun 26 11:06:56 2017 (r2683)
+++ trunk/GME/Meta/MgaMetaProject.cpp Tue Jul 18 13:19:54 2017 (r2684)
@@ -179,7 +179,7 @@
COMTHROW(coreproject->get_UndoQueueSize(&undos));
if (undos)
{
- HRESULT hr = coreproject->SaveProject(L"", VARIANT_TRUE);
+ HRESULT hr = coreproject->SaveProject(NULL, VARIANT_TRUE);
if (FAILED(hr))
return hr;
}
Modified: trunk/GME/Mga/MgaComplexOps.cpp
==============================================================================
--- trunk/GME/Mga/MgaComplexOps.cpp Mon Jun 26 11:06:56 2017 (r2683)
+++ trunk/GME/Mga/MgaComplexOps.cpp Tue Jul 18 13:19:54 2017 (r2684)
@@ -1415,7 +1415,7 @@
COMTHROW(get_Meta(&mf));
CComQIPtr<IMgaMetaModel> parentmeta = mf;
if(!parentmeta) COMTHROW(E_MGA_META_INCOMPATIBILITY);
- cur[ATTRID_ROLEMETA];
+ cur[ATTRID_ROLEMETA]; // FIXME what is this for
metaref_type t;
t = (nobjs[i])[ATTRID_ROLEMETA];
if(!t) COMTHROW(E_MGA_NO_ROLE);
Modified: trunk/GME/Mga/MgaFCO.cpp
==============================================================================
--- trunk/GME/Mga/MgaFCO.cpp Mon Jun 26 11:06:56 2017 (r2683)
+++ trunk/GME/Mga/MgaFCO.cpp Tue Jul 18 13:19:54 2017 (r2684)
@@ -433,7 +433,7 @@
if (n.Length() == len)
f = 1;
else {
- swscanf(n+len,L"-%d", &f);
+ swscanf(n+len,L"-%u", &f);
f++;
if(f > NEWNAME_MAXNUM) COMTHROW(E_MGA_GEN_OUT_OF_SPACE);
}
Modified: trunk/GME/Mga/MgaFilter.cpp
==============================================================================
--- trunk/GME/Mga/MgaFilter.cpp Mon Jun 26 11:06:56 2017 (r2683)
+++ trunk/GME/Mga/MgaFilter.cpp Tue Jul 18 13:19:54 2017 (r2684)
@@ -14,8 +14,8 @@
for(OLECHAR *p = wcstok(level, L" "); p; p = wcstok(NULL,L" ")) {
int low, high, highincr = 0;
OLECHAR c;
- switch(swscanf(p,L"%u%c%u", &low, &c, &high)) {
- case 0: if(swscanf(p,L"-%u", &high) != 1) COMTHROW(E_MGA_FILTERFORMAT);
+ switch(swscanf(p,L"%d%c%d", &low, &c, &high)) {
+ case 0: if(swscanf(p,L"-%d", &high) != 1) COMTHROW(E_MGA_FILTERFORMAT);
low = 0;
break;
case 1: high=low;
Modified: trunk/GME/MgaUtil/AnnotationNode.cpp
==============================================================================
--- trunk/GME/MgaUtil/AnnotationNode.cpp Mon Jun 26 11:06:56 2017 (r2683)
+++ trunk/GME/MgaUtil/AnnotationNode.cpp Tue Jul 18 13:19:54 2017 (r2684)
@@ -270,7 +270,7 @@
if (lfNode != NULL) {
COMTHROW(lfNode->get_Value(&bstr));
CString strVal(bstr);
- if (_stscanf(strVal,_T("%ld"),&m_iGradientDirection) != 1) {
+ if (_stscanf(strVal,_T("%d"),&m_iGradientDirection) != 1) {
m_iGradientDirection = defGradientDirection;
}
}
@@ -308,7 +308,7 @@
if (lfNode != NULL) {
COMTHROW(lfNode->get_Value(&bstr));
CString strVal(bstr);
- if (_stscanf(strVal,_T("%ld"),&m_iShadowDepth) != 1) {
+ if (_stscanf(strVal,_T("%d"),&m_iShadowDepth) != 1) {
m_iShadowDepth = defShadowDepth;
}
}
@@ -327,7 +327,7 @@
if (lfNode != NULL) {
COMTHROW(lfNode->get_Value(&bstr));
CString strVal(bstr);
- if (_stscanf(strVal,_T("%ld"),&m_iShadowDirection) != 1) {
+ if (_stscanf(strVal,_T("%d"),&m_iShadowDirection) != 1) {
m_iShadowDirection = defShadowDirection;
}
}
@@ -365,7 +365,7 @@
if (lfNode != NULL) {
COMTHROW(lfNode->get_Value(&bstr));
CString strVal(bstr);
- if (_stscanf(strVal,_T("%ld"),&m_iRoundCornerRadius) != 1) {
+ if (_stscanf(strVal,_T("%d"),&m_iRoundCornerRadius) != 1) {
m_iRoundCornerRadius = defRoundCornerRadius;
}
}
Modified: trunk/GME/MgaUtil/GmeDlg.cpp
==============================================================================
--- trunk/GME/MgaUtil/GmeDlg.cpp Mon Jun 26 11:06:56 2017 (r2683)
+++ trunk/GME/MgaUtil/GmeDlg.cpp Tue Jul 18 13:19:54 2017 (r2684)
@@ -217,6 +217,9 @@
// memcpy(&ourCatID, &CATID_ActiveScriptParse, sizeof(ourCatID));
hResult = pCatInformation.CoCreateInstance(CLSID_StdComponentCategoriesMgr);
+ if (FAILED(hResult)) {
+ return;
+ }
hResult = pCatInformation->EnumClassesOfCategories(
1, &ourCatID, ((ULONG) -1), NULL, &pEnumGUID);
Modified: trunk/GME/MgaUtil/MgaRegistrar.cpp
==============================================================================
--- trunk/GME/MgaUtil/MgaRegistrar.cpp Mon Jun 26 11:06:56 2017 (r2683)
+++ trunk/GME/MgaUtil/MgaRegistrar.cpp Tue Jul 18 13:19:54 2017 (r2684)
@@ -1512,9 +1512,10 @@
{
CString error;
if (inguidstr)
- error.Format(L"Paradigm '%s' with GUID '%s' is not registered.", pname, inguidstr);
+ error.Format(L"Paradigm '%s' with GUID '%s' is not registered.", static_cast<const wchar_t*>(pname),
+ static_cast<const wchar_t*>(inguidstr));
else
- error.Format(L"Paradigm '%s' is not registered.", pname);
+ error.Format(L"Paradigm '%s' is not registered.", static_cast<const wchar_t*>(pname));
SetErrorInfo(error);
return E_NOTFOUND;
}
Modified: trunk/GME/MgaUtil/MgaResolver.cpp
==============================================================================
--- trunk/GME/MgaUtil/MgaResolver.cpp Mon Jun 26 11:06:56 2017 (r2683)
+++ trunk/GME/MgaUtil/MgaResolver.cpp Tue Jul 18 13:19:54 2017 (r2684)
@@ -2230,6 +2230,7 @@
delete map_find;
map_RoleByPathStr.RemoveAt(pos);
}
+ delete map_key;
return true;
}
map_RoleByPathStr.GetNext(pos);
Modified: trunk/GME/Search/Input.cpp
==============================================================================
--- trunk/GME/Search/Input.cpp Mon Jun 26 11:06:56 2017 (r2683)
+++ trunk/GME/Search/Input.cpp Tue Jul 18 13:19:54 2017 (r2684)
@@ -81,7 +81,7 @@
//check if nothing is present in the second
- if(strAttributeSecond.Trim()==_T("") && strKindSecond.Trim()==_T("")&& strRoleSecond.Trim()==_T("") && strAttributeSecond.Trim()==_T(""))
+ if(strNameSecond.Trim()==_T("") && strKindSecond.Trim()==_T("")&& strRoleSecond.Trim()==_T("") && strAttributeSecond.Trim()==_T(""))
{
m_bDoSecond=FALSE;
}
Modified: trunk/GME/Search/SearchAlg.cpp
==============================================================================
--- trunk/GME/Search/SearchAlg.cpp Mon Jun 26 11:06:56 2017 (r2683)
+++ trunk/GME/Search/SearchAlg.cpp Tue Jul 18 13:19:54 2017 (r2684)
@@ -596,7 +596,7 @@
const wchar_t* attributeValue = static_cast<const wchar_t*>(attribute.value);
wchar_t* endPtr;
- wcstol(attributeValue, &endPtr, 10);
+ intSearchValue = wcstol(attributeValue, &endPtr, 10);
if (endPtr == attributeValue + wcslen(attributeValue) && attribute.CheckInteger(intActualValue, intSearchValue))
attribute.eval = TRUE;
} break;
More information about the gme-commit
mailing list