[commit] r1599 - in trunk/GME: Common GMEActiveBrowser Gme Mga MgaUtil ObjectInspector Search XmlBackEnd

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Tue Oct 11 10:11:31 CDT 2011


Author: ksmyth
Date: Tue Oct 11 10:11:28 2011
New Revision: 1599

Log:
Fix warnings

Modified:
   trunk/GME/Common/CommonSmart.cpp
   trunk/GME/GMEActiveBrowser/MetaTreeCtrl.cpp
   trunk/GME/Gme/EnumVar.h
   trunk/GME/Gme/GMEApp.cpp
   trunk/GME/Gme/GMEDoc.cpp
   trunk/GME/Gme/GMEOLEColl.cpp
   trunk/GME/Gme/GMEOLEIt.cpp
   trunk/GME/Gme/GUIObject.cpp
   trunk/GME/Gme/MgaOpenDlg.cpp
   trunk/GME/Gme/NewXmlbackendProjDlg.cpp
   trunk/GME/Gme/mfcdual.cpp
   trunk/GME/Mga/MgaAttribute.cpp
   trunk/GME/Mga/MgaFCO.cpp
   trunk/GME/Mga/MgaFCO.h
   trunk/GME/Mga/MgaFolder.cpp
   trunk/GME/MgaUtil/MgaEventLogger.cpp
   trunk/GME/MgaUtil/MgaRegistrar.cpp
   trunk/GME/MgaUtil/MgaResolver.cpp
   trunk/GME/ObjectInspector/CompassData.cpp
   trunk/GME/ObjectInspector/InspectorDlg.cpp
   trunk/GME/ObjectInspector/InspectorList.cpp
   trunk/GME/Search/SearchAlg.cpp
   trunk/GME/XmlBackEnd/DOMErrorPrinter.cpp

Modified: trunk/GME/Common/CommonSmart.cpp
==============================================================================
--- trunk/GME/Common/CommonSmart.cpp	Tue Oct 11 10:10:49 2011	(r1598)
+++ trunk/GME/Common/CommonSmart.cpp	Tue Oct 11 10:11:28 2011	(r1599)
@@ -11,6 +11,8 @@
 
 	if( pl != ql )
 		return pl - ql;
+	if (pl == NULL && ql == NULL)
+		return 0;
 
 	return wcsncmp(p, q, pl);
 }

Modified: trunk/GME/GMEActiveBrowser/MetaTreeCtrl.cpp
==============================================================================
--- trunk/GME/GMEActiveBrowser/MetaTreeCtrl.cpp	Tue Oct 11 10:10:49 2011	(r1598)
+++ trunk/GME/GMEActiveBrowser/MetaTreeCtrl.cpp	Tue Oct 11 10:11:28 2011	(r1599)
@@ -33,7 +33,7 @@
 
 	if(hParent==NULL)	// Root folder
 	{
-		HTREEITEM hItem=CTreeCtrlEx::InsertItem(strObjectName,0,0,hParent,TVI_SORT);	
+		HTREEITEM hItem=CTreeCtrlEx::InsertItem(strObjectName,0,0,TVI_ROOT,TVI_SORT);	
 		CMgaObjectProxy ObjectProxy(pUnknown,otObjectType);
 		m_MgaMap.AddEntry(hItem,ObjectProxy);
 		SetItemData(hItem,(DWORD)0);

Modified: trunk/GME/Gme/EnumVar.h
==============================================================================
--- trunk/GME/Gme/EnumVar.h	Tue Oct 11 10:10:49 2011	(r1598)
+++ trunk/GME/Gme/EnumVar.h	Tue Oct 11 10:11:28 2011	(r1599)
@@ -18,6 +18,7 @@
 	DECLARE_DYNCREATE(CEnumVariant)
 public:
 	CEnumVariant();         // protected constructor used by dynamic creation
+	virtual ~CEnumVariant();
 
 // Attributes
 public:
@@ -38,7 +39,6 @@
 
 // Implementation
 protected:
-	virtual ~CEnumVariant();
 	CEnumVariant* m_pClonedFrom;
 
 	// Generated message map functions

Modified: trunk/GME/Gme/GMEApp.cpp
==============================================================================
--- trunk/GME/Gme/GMEApp.cpp	Tue Oct 11 10:10:49 2011	(r1598)
+++ trunk/GME/Gme/GMEApp.cpp	Tue Oct 11 10:11:28 2011	(r1599)
@@ -940,7 +940,8 @@
 			CMFCToolBarButton toolBarButton(commandID, nIndex, componentName + '\n' + toolTip, TRUE);
 
 			componentBar.InsertButton(toolBarButton);
-			FreeLibrary(hModule);
+			if (hModule)
+				FreeLibrary(hModule);
 		}
 		if (plugins.GetSize() + interpreters.GetSize() != 0) {
 			componentBar.AdjustLayout();	// CMFCToolBar::AdjustLayout
@@ -1477,7 +1478,7 @@
 	    if(hr == E_MGA_PARADIGM_NOTREG || hr == E_MGA_PARADIGM_INVALID) {
 			TCHAR buf[200];
 		    _stprintf_s(buf, _T("Could not open current version of paradigm %s"), 
-				metaname);
+				static_cast<const TCHAR*>(metaname));
 
 			AfxMessageBox(buf);
 			DiagnoseParadigm(metaname);
@@ -2087,7 +2088,7 @@
 						if(h1 != S_OK) {
 							_stprintf_s(buf, _T("Could not locate paradigm %s\nVersion ID: %s\n")
 										 _T("Do you want to upgrade to the current version instead?\nCurrent ID: %s"), 
-										 PutInCString(paradigm), PutInCString(parguid1), PutInCString(parguid2));
+										 static_cast<const TCHAR*>(paradigm), static_cast<const TCHAR*>(parguid1), static_cast<const TCHAR*>(parguid2));
 										 if(AfxMessageBox(buf,MB_OKCANCEL | MB_ICONQUESTION) == IDOK) {
 											parguid = pg2;
 										 }
@@ -2100,7 +2101,7 @@
 						else if(parguid1.Compare(parguid2)) {
 							_stprintf_s(buf, _T("This model was exported using paradigm %s\nVersion ID: %s\n")
 										 _T("Do you want to upgrade to the current version?\nCurrent ID: %s"), 
-										 PutInCString(paradigm), PutInCString(parguid1), PutInCString(parguid2));
+										 static_cast<const TCHAR*>(paradigm), static_cast<const TCHAR*>(parguid1), static_cast<const TCHAR*>(parguid2));
 										 int answer = AfxMessageBox(buf,MB_YESNOCANCEL | MB_ICONQUESTION);
 										 if(answer == IDYES) {
 											parguid = pg2;
@@ -2124,7 +2125,7 @@
 					CopyTo(parguid,gg);
 					CopyTo(gg, parguid1);
 					_stprintf_s(buf, _T("Could not open paradigm %s\nVersion ID: %s"), 
-						PutInCString(paradigm), PutInCString(parguid1));
+						static_cast<const TCHAR*>(paradigm), static_cast<const TCHAR*>(parguid1));
 
 					AfxMessageBox(buf);
 				}
@@ -2213,7 +2214,7 @@
 			if(!parguid1.Compare(currentguid)) {
 				TCHAR buf[200];
 				_stprintf_s(buf, _T("There is no need to upgrade this model\nIts Meta Version ID is the current ID\nCurrent ID: %s"), 
-					PutInCString(currentguid));
+					static_cast<const TCHAR*>(currentguid));
 				AfxMessageBox(buf);
 				return;
 			}
@@ -2237,7 +2238,8 @@
 		if(!MoveFile(fname, backupname)) {
 			backupname = fname;
 			TCHAR buf[300];
-			_stprintf_s( buf, _T("Could not save original file '%s' to '%s'"), fname, backupname); 
+			_stprintf_s( buf, _T("Could not save original file '%s' to '%s'"), 
+				static_cast<const TCHAR*>(fname), static_cast<const TCHAR*>(backupname)); 
 			AfxMessageBox(buf);
 			COMTHROW(E_NOTFOUND);
 		}
@@ -2275,7 +2277,8 @@
 			if(backupname.Compare(fname)) {
 				if(MoveFile(backupname, fname)) backupname = fname;
 			}
-			_stprintf_s(buf, _T("The upgrade failed: 0x%x\nThe original model is in file %s"), e.hr, backupname);
+			_stprintf_s(buf, _T("The upgrade failed: 0x%x\nThe original model is in file %s"), e.hr, 
+				static_cast<const TCHAR*>(backupname));
 			AfxMessageBox(buf);
 		}
 	}
@@ -2794,7 +2797,7 @@
 						if(h1 != S_OK) {
 							_stprintf_s(buf, _T("Could not locate paradigm %s\nVersion ID: %s\n")
 										 _T("Do you want to upgrade to the current version instead?\nCurrent ID: %s"), 
-							PutInCString(paradigm), PutInCString(parguid1), PutInCString(parguid2));
+							static_cast<const TCHAR*>(paradigm), static_cast<const TCHAR*>(parguid1), static_cast<const TCHAR*>(parguid2));
 							if (AfxMessageBox(buf,MB_OKCANCEL | MB_ICONQUESTION) == IDOK) {
 								parguid = pg2;
 							} else {
@@ -2805,7 +2808,7 @@
 						else if(parguid1.Compare(parguid2)) {
 							_stprintf_s(buf, _T("This model was exported using paradigm %s\nVersion ID: %s\n")
 										 _T("Do you want to upgrade to the current version?\nCurrent ID: %s"), 
-										 PutInCString(paradigm), PutInCString(parguid1), PutInCString(parguid2));
+										 static_cast<const TCHAR*>(paradigm), static_cast<const TCHAR*>(parguid1), static_cast<const TCHAR*>(parguid2));
 							int answer = AfxMessageBox(buf,MB_YESNOCANCEL | MB_ICONQUESTION);
 							if (answer == IDYES) {
 								parguid = pg2;
@@ -2828,7 +2831,7 @@
 					CopyTo(parguid,gg);
 					CopyTo(gg, parguid1);
 					_stprintf_s(buf, _T("Could not open paradigm %s\nVersion ID: %s"), 
-						PutInCString(paradigm), PutInCString(parguid1));
+						static_cast<const TCHAR*>(paradigm), static_cast<const TCHAR*>(parguid1));
 
 					AfxMessageBox(buf);
 				}

Modified: trunk/GME/Gme/GMEDoc.cpp
==============================================================================
--- trunk/GME/Gme/GMEDoc.cpp	Tue Oct 11 10:10:49 2011	(r1598)
+++ trunk/GME/Gme/GMEDoc.cpp	Tue Oct 11 10:11:28 2011	(r1599)
@@ -1372,6 +1372,7 @@
 			++it;
 	}
 
+	// FIXME: MAX_LEN != MAX_LEN is always false
 	const int MAX_LEN = -1;
 	while( MAX_LEN != -1 && m_backStack.size() > MAX_LEN)
 	{

Modified: trunk/GME/Gme/GMEOLEColl.cpp
==============================================================================
--- trunk/GME/Gme/GMEOLEColl.cpp	Tue Oct 11 10:10:49 2011	(r1598)
+++ trunk/GME/Gme/GMEOLEColl.cpp	Tue Oct 11 10:11:28 2011	(r1599)
@@ -92,9 +92,9 @@
 
 LPUNKNOWN CGMEOLEColl::GetNewEnum()
 {
-	CEnumVariant* pEnum = new CEnumVariant;
+	std::unique_ptr<CEnumVariant> pEnum(new CEnumVariant);
 	int nCount = m_ptrArray.GetSize();
-	VARIANT* pContents = new VARIANT[nCount];
+	std::unique_ptr<VARIANT[]> pContents(new VARIANT[nCount]);
 	int i;
 
 	TRY
@@ -117,9 +117,9 @@
 		THROW_LAST();
 	}
 	END_CATCH_ALL
-	pEnum->SetContents(pContents, nCount);
+	pEnum->SetContents(pContents.release(), nCount);
 
-	return pEnum->GetInterface(&IID_IUnknown);
+	return pEnum.release()->GetInterface(&IID_IUnknown);
 }
 
 long CGMEOLEColl::GetCount()

Modified: trunk/GME/Gme/GMEOLEIt.cpp
==============================================================================
--- trunk/GME/Gme/GMEOLEIt.cpp	Tue Oct 11 10:10:49 2011	(r1598)
+++ trunk/GME/Gme/GMEOLEIt.cpp	Tue Oct 11 10:11:28 2011	(r1599)
@@ -428,7 +428,7 @@
 			p_portResult = getChildInByName( model, p_portRole);
 
 			if( !p_refChainResult)
-				p_refChainResult.CoCreateInstance( L"Mga.MgaFCOs");
+				COMTHROW(p_refChainResult.CoCreateInstance( L"Mga.MgaFCOs"));
 
 			COMTHROW( p_refChainResult->Append( ref ));
 
@@ -443,7 +443,7 @@
 			if( ref2) //yes it seems
 			{
 				if( !p_refChainResult)
-					p_refChainResult.CoCreateInstance( L"Mga.MgaFCOs");
+					COMTHROW(p_refChainResult.CoCreateInstance( L"Mga.MgaFCOs"));
 
 				COMTHROW( p_refChainResult->Append( ref ));
 				ref = ref2;
@@ -474,7 +474,8 @@
 {
 	CComQIPtr<IMgaReference> ref( p_ref);
 	CComPtr<IMgaFCO> tgt;
-	if( !coll) coll.CoCreateInstance( L"Mga.MgaFCOs");
+	if( !coll) 
+		COMTHROW(coll.CoCreateInstance( L"Mga.MgaFCOs"));
 	VERIFY( coll);
 
 	bool valid = ref != 0;
@@ -2584,7 +2585,7 @@
 		CComQIPtr<IMgaModel> model( putInTerr( m_theMgaModel));
 
 		CComPtr<IMgaFCOs> coll;
-		coll.CoCreateInstance( L"Mga.MgaFCOs");
+		COMTHROW(coll.CoCreateInstance( L"Mga.MgaFCOs"));
 		
 		CString tok,m = list;
 		int i = 0;

Modified: trunk/GME/Gme/GUIObject.cpp
==============================================================================
--- trunk/GME/Gme/GUIObject.cpp	Tue Oct 11 10:10:49 2011	(r1598)
+++ trunk/GME/Gme/GUIObject.cpp	Tue Oct 11 10:11:28 2011	(r1599)
@@ -1546,7 +1546,7 @@
 		CGuiMetaAspect *guiAsp = GetGuiMetaParent()->FindAspect(aspect);
 		CComPtr<IMgaMetaBase> mBase = guiAsp->mgaMeta;
 		CComPtr<IMgaMetaAspect> mAspect;
-		mBase.QueryInterface(&mAspect);
+		COMTHROW(mBase.QueryInterface(&mAspect));
 		COMTHROW(mgaFco->get_Part(mAspect,&part));
 		CRect r = guiAspects[aspect]->GetLocation();
 		// Save position part

Modified: trunk/GME/Gme/MgaOpenDlg.cpp
==============================================================================
--- trunk/GME/Gme/MgaOpenDlg.cpp	Tue Oct 11 10:10:49 2011	(r1598)
+++ trunk/GME/Gme/MgaOpenDlg.cpp	Tue Oct 11 10:11:28 2011	(r1599)
@@ -143,7 +143,7 @@
 
 	try
 	{
-		if( (allowXme && (m_radio = 0)) || (DoModal() == IDOK && !pressed_back) )
+		if( (allowXme && (m_radio /*n.b. = */ = 0)) || (DoModal() == IDOK && !pressed_back) )
 		{
 			if( m_radio == 0 )
 			{

Modified: trunk/GME/Gme/NewXmlbackendProjDlg.cpp
==============================================================================
--- trunk/GME/Gme/NewXmlbackendProjDlg.cpp	Tue Oct 11 10:10:49 2011	(r1598)
+++ trunk/GME/Gme/NewXmlbackendProjDlg.cpp	Tue Oct 11 10:11:28 2011	(r1599)
@@ -151,7 +151,7 @@
 		m_connectionString += _T(" svn=\"");
 		m_connectionString += m_svnUrl;
 		m_connectionString += _T("\"");
-		TCHAR gmepath[200];
+		TCHAR gmepath[MAX_PATH];
 		if(SHGetSpecialFolderPath( NULL, gmepath, CSIDL_APPDATA, true)) //most likely C:\Documents and Settings\<username>\Application Data
 		{
 			WIN32_FILE_ATTRIBUTE_DATA attr;

Modified: trunk/GME/Gme/mfcdual.cpp
==============================================================================
--- trunk/GME/Gme/mfcdual.cpp	Tue Oct 11 10:10:49 2011	(r1598)
+++ trunk/GME/Gme/mfcdual.cpp	Tue Oct 11 10:11:28 2011	(r1599)
@@ -90,11 +90,10 @@
 
 		// Set up ErrInfo object
 		pcerrinfo->SetGUID(guid);
-		CT2COLE strDescription(pszDescription);
-		pcerrinfo->SetDescription(::SysAllocString(strDescription));
+		pcerrinfo->SetDescription(const_cast<LPOLESTR>(pszDescription));
 		pcerrinfo->SetHelpContext(dwHelpContext);
-		pcerrinfo->SetHelpFile(bstrHelpFile);
-		pcerrinfo->SetSource(bstrSource);
+		pcerrinfo->SetHelpFile(bstrHelpFile ? bstrHelpFile : L"");
+		pcerrinfo->SetSource(bstrSource ? bstrSource : L"");
 
 		TRACE("\tSource = %ws\n", bstrSource);
 		TRACE("\tDescription = %s\n", pszDescription);

Modified: trunk/GME/Mga/MgaAttribute.cpp
==============================================================================
--- trunk/GME/Mga/MgaAttribute.cpp	Tue Oct 11 10:10:49 2011	(r1598)
+++ trunk/GME/Mga/MgaAttribute.cpp	Tue Oct 11 10:11:28 2011	(r1599)
@@ -539,7 +539,7 @@
 			wcsncpy(z, obname, len);
 			z[len] = '\0';
 			nob[ATTRID_NAME] = z;
-			delete z;
+			delete[] z;
 		}
 		nob[ATTRID_REGFLAGS] = 0; 
 		nob[ATTRID_REGNOWNER] =  cur;

Modified: trunk/GME/Mga/MgaFCO.cpp
==============================================================================
--- trunk/GME/Mga/MgaFCO.cpp	Tue Oct 11 10:10:49 2011	(r1598)
+++ trunk/GME/Mga/MgaFCO.cpp	Tue Oct 11 10:11:28 2011	(r1599)
@@ -882,7 +882,7 @@
 			if (vt == ATTVAL_ENUM) vt = ATTVAL_STRING;
 			attrid_type aid = ATTRID_ATTRTYPESBASE + vt;
 			CComVariant current = ITER[aid];
-			static const VARTYPE vartypes[] = { VT_NULL, VT_BSTR, VT_I4, VT_R8, VT_BOOL, VT_DISPATCH, VT_BSTR };
+			static const VARTYPE vartypes[] = { VT_NULL, VT_BSTR, VT_I4, VT_R8, VT_BOOL, VT_DISPATCH, VT_BSTR, VT_NULL };
 			if(vartypes[vt] != current.vt) {
 				COMTHROW(current.ChangeType(vartypes[vt]));
 			}

Modified: trunk/GME/Mga/MgaFCO.h
==============================================================================
--- trunk/GME/Mga/MgaFCO.h	Tue Oct 11 10:10:49 2011	(r1598)
+++ trunk/GME/Mga/MgaFCO.h	Tue Oct 11 10:11:28 2011	(r1599)
@@ -135,7 +135,7 @@
  STDMETHOD(get_CurrentAssociation)( VARIANT *udp)  { 
 														COMTRY {
 															CHECK_OUTPAR(udp);
-															VariantCopy(udp, &userdata); 
+															COMTHROW(VariantCopy(udp, &userdata)); 
 														} COMCATCH(;)
 													}
  STDMETHOD(GetParent)( IMgaContainer **pVal,  objtype_enum *l)  { return inFCO->GetParent(pVal,l); }

Modified: trunk/GME/Mga/MgaFolder.cpp
==============================================================================
--- trunk/GME/Mga/MgaFolder.cpp	Tue Oct 11 10:10:49 2011	(r1598)
+++ trunk/GME/Mga/MgaFolder.cpp	Tue Oct 11 10:11:28 2011	(r1599)
@@ -789,7 +789,8 @@
 			CopyTo( relpos_b, relpos_str);
 
 			int relpos;
-			sscanf( relpos_str.c_str(), "%d", &relpos);
+			if (sscanf( relpos_str.c_str(), "%d", &relpos) != 1)
+				return E_INVALIDARG;
 
 			// take from the samename_objs map the element at relpos relative position
 			std::map< objid_type, std::vector<CoreObj> >::iterator ii = samename_objs.begin();

Modified: trunk/GME/MgaUtil/MgaEventLogger.cpp
==============================================================================
--- trunk/GME/MgaUtil/MgaEventLogger.cpp	Tue Oct 11 10:10:49 2011	(r1598)
+++ trunk/GME/MgaUtil/MgaEventLogger.cpp	Tue Oct 11 10:11:28 2011	(r1599)
@@ -34,7 +34,7 @@
 		{
 			newLine = true;
 		}
-		_ftprintf(EventLog, _T("%s"), s);
+		_ftprintf(EventLog, _T("%s"), static_cast<const TCHAR*>(s));
 		fflush(EventLog);
 	}
 	return S_OK;
@@ -45,7 +45,7 @@
 	if(!initialized) //if already initialized, don't do anything
 	{
 		CString path;
-		TCHAR gmepath[200];
+		TCHAR gmepath[MAX_PATH];
 		if(SHGetSpecialFolderPath( NULL, gmepath, CSIDL_APPDATA, true)) //most likely C:\Documents and Settings\<username>\Application Data
 		{
 			path = CString(gmepath) + _T("\\GME"); // add \GME to the path

Modified: trunk/GME/MgaUtil/MgaRegistrar.cpp
==============================================================================
--- trunk/GME/MgaUtil/MgaRegistrar.cpp	Tue Oct 11 10:10:49 2011	(r1598)
+++ trunk/GME/MgaUtil/MgaRegistrar.cpp	Tue Oct 11 10:11:28 2011	(r1599)
@@ -1542,9 +1542,9 @@
 				mode = REGACCESS_USER;
 				for(int index = 0;; ++index) {
 					TCHAR name[512];
-					DWORD namesize = sizeof(name);
+					DWORD namesize = sizeof(name) / sizeof(name[0]);
 					BYTE value[512];
-					DWORD valuesize = sizeof(value);
+					DWORD valuesize = sizeof(value) / sizeof(value[0]);
 					DWORD valtype;
 
 					LONG err = RegEnumValue(par, index, name, &namesize, NULL, &valtype, value, &valuesize);
@@ -1660,9 +1660,9 @@
 			
 			for(int index = 0;; ++index) {
 				TCHAR name[512];
-				DWORD namesize = sizeof(name);
+				DWORD namesize = sizeof(name) / sizeof(name[0]);
 				BYTE value[512];
-				DWORD valuesize = sizeof(value);
+				DWORD valuesize = sizeof(value) / sizeof(value[0]);
 				DWORD valtype;
 
 				LONG err = RegEnumValue(par, index, name, &namesize, NULL, &valtype, value, &valuesize);
@@ -1875,7 +1875,7 @@
 			if(res != ERROR_SUCCESS && res != ERROR_ACCESS_DENIED && res != ERROR_FILE_NOT_FOUND) ERRTHROW(res);
 			if(res == ERROR_SUCCESS) {
 				comp.QueryDWORDValue(_T("Type"), dwType);
-				ULONG count;
+				ULONG count = 0;
 				res = comp.QueryStringValue(_T("Description"), NULL, &count);
 				if (strDesc == _T("") && res == ERROR_SUCCESS) {
 					CString ret;
@@ -1985,7 +1985,7 @@
 			LONG res = comp.Open(hives[i], rootreg+_T("\\Components\\")+progidstr, KEY_READ);
 			if(res != ERROR_SUCCESS && res != ERROR_ACCESS_DENIED && res != ERROR_FILE_NOT_FOUND) ERRTHROW(res);
 			if(res == ERROR_SUCCESS) {
-				ULONG count;
+				ULONG count = 0;
 				res = comp.QueryStringValue(PutInCString(name), NULL, &count);
 				if (res == ERROR_SUCCESS) {
 					CString ret;
@@ -2071,7 +2071,7 @@
 	if (acomp.Open(hive, rootreg + _T("\\Components\\") + progidstr + _T("\\Associated"), KEY_READ) != ERROR_SUCCESS) {
 		return Tristate_Not_Specified;
 	}
-	ULONG count;
+	ULONG count = 0;
 	DWORD res = acomp.QueryValue(paradigmstr, NULL, NULL, &count);
 	if (res != ERROR_SUCCESS) {
 		return Tristate_Not_Specified;

Modified: trunk/GME/MgaUtil/MgaResolver.cpp
==============================================================================
--- trunk/GME/MgaUtil/MgaResolver.cpp	Tue Oct 11 10:10:49 2011	(r1598)
+++ trunk/GME/MgaUtil/MgaResolver.cpp	Tue Oct 11 10:11:28 2011	(r1599)
@@ -184,7 +184,7 @@
 		ASSERT(parent_mfolder != NULL);
 
 		COMTHROW( 
-			(hr = parent_mfolder->get_LegalChildFolderByName(kind, &mfolder)) ? // == E_NOTFOUND???
+			(hr = parent_mfolder->get_LegalChildFolderByName(kind, &mfolder)) == E_NOTFOUND ?
 			S_OK : hr
 		);
 
@@ -197,7 +197,7 @@
 				CComBSTR kind2 = prefixIt( kind);
 				// try with prefixed name
 				COMTHROW( 
-					(hr = parent_mfolder->get_LegalChildFolderByName(kind2, &mfolder)) ? // == E_NOTFOUND???
+					(hr = parent_mfolder->get_LegalChildFolderByName(kind2, &mfolder)) == E_NOTFOUND ?
 					S_OK : hr
 				);
 			}
@@ -206,7 +206,7 @@
 				CComBSTR kind2 = truncIt( kind);
 				// try with truncated name
 				COMTHROW( 
-					(hr = parent_mfolder->get_LegalChildFolderByName(kind2, &mfolder)) ? // == E_NOTFOUND???
+					(hr = parent_mfolder->get_LegalChildFolderByName(kind2, &mfolder)) == E_NOTFOUND ?
 					S_OK : hr
 				);
 			}
@@ -216,7 +216,7 @@
 				CComBSTR kind2 = prefixIt( kind1);
 				// try with migrated name from one namespace to another
 				COMTHROW( 
-					(hr = parent_mfolder->get_LegalChildFolderByName(kind2, &mfolder)) ? // == E_NOTFOUND???
+					(hr = parent_mfolder->get_LegalChildFolderByName(kind2, &mfolder)) == E_NOTFOUND ?
 					S_OK : hr
 				);
 			}

Modified: trunk/GME/ObjectInspector/CompassData.cpp
==============================================================================
--- trunk/GME/ObjectInspector/CompassData.cpp	Tue Oct 11 10:10:49 2011	(r1598)
+++ trunk/GME/ObjectInspector/CompassData.cpp	Tue Oct 11 10:11:28 2011	(r1599)
@@ -358,7 +358,7 @@
 {
 	ASSERT(bIsSingle(uData));
 
-	UINT uMgaValue;
+	UINT uMgaValue = CMPS_SOUTH;
 
 	if(uData&CMPS_NORTH)
 	{

Modified: trunk/GME/ObjectInspector/InspectorDlg.cpp
==============================================================================
--- trunk/GME/ObjectInspector/InspectorDlg.cpp	Tue Oct 11 10:10:49 2011	(r1598)
+++ trunk/GME/ObjectInspector/InspectorDlg.cpp	Tue Oct 11 10:11:28 2011	(r1599)
@@ -185,7 +185,7 @@
 	logFont.lfCharSet = DEFAULT_CHARSET;
 	logFont.lfHeight = INSP_ENTRY_FONT_PTSIZE;
 	logFont.lfWeight = FW_BOLD;
-	lstrcpyn(logFont.lfFaceName, INSP_ENTRY_FONT_FACE, sizeof(logFont.lfFaceName));
+	lstrcpyn(logFont.lfFaceName, INSP_ENTRY_FONT_FACE, sizeof(logFont.lfFaceName)/sizeof(TCHAR));
 
 	VERIFY(m_BoldFont.CreatePointFontIndirect(&logFont, NULL));
 

Modified: trunk/GME/ObjectInspector/InspectorList.cpp
==============================================================================
--- trunk/GME/ObjectInspector/InspectorList.cpp	Tue Oct 11 10:10:49 2011	(r1598)
+++ trunk/GME/ObjectInspector/InspectorList.cpp	Tue Oct 11 10:11:28 2011	(r1599)
@@ -70,7 +70,7 @@
 	logFont.lfCharSet = DEFAULT_CHARSET;
 	logFont.lfHeight = INSP_ENTRY_FONT_PTSIZE;
 	logFont.lfWeight = FW_BOLD;
-	lstrcpyn(logFont.lfFaceName, INSP_ENTRY_FONT_FACE, sizeof(logFont.lfFaceName));
+	lstrcpyn(logFont.lfFaceName, INSP_ENTRY_FONT_FACE, sizeof(logFont.lfFaceName) / sizeof(TCHAR));
 
 	VERIFY(m_entryBoldFont.CreatePointFontIndirect(&logFont, NULL));
 

Modified: trunk/GME/Search/SearchAlg.cpp
==============================================================================
--- trunk/GME/Search/SearchAlg.cpp	Tue Oct 11 10:10:49 2011	(r1598)
+++ trunk/GME/Search/SearchAlg.cpp	Tue Oct 11 10:11:28 2011	(r1599)
@@ -538,7 +538,7 @@
             //User supplied values
             int intSearchValue;
             double dblSearchValue;
-            bool bSearchValue;	
+            bool bSearchValue = false;
 
             CBstr bstrS;
             long value;

Modified: trunk/GME/XmlBackEnd/DOMErrorPrinter.cpp
==============================================================================
--- trunk/GME/XmlBackEnd/DOMErrorPrinter.cpp	Tue Oct 11 10:10:49 2011	(r1598)
+++ trunk/GME/XmlBackEnd/DOMErrorPrinter.cpp	Tue Oct 11 10:11:28 2011	(r1599)
@@ -36,7 +36,7 @@
 		memset( line_nmbs, 0, sizeof(line_nmbs));
 
 		smart_Ch f_str = XMLString::transcode(loc->getURI());
-		sprintf( line_nmbs, "Line: %u Column: %u of File: ", loc->getLineNumber(), loc->getColumnNumber());
+		sprintf( line_nmbs, "Line: %u Column: %u of File: ", (unsigned)loc->getLineNumber(), (unsigned)loc->getColumnNumber());
 		std::string linfo = std::string( line_nmbs) + f_str;
 
 		// send msg


More information about the gme-commit mailing list