From d5f98458e06b9aee5522dc9475b5676e6fd14317 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sun, 14 Dec 2014 17:35:00 +0000 Subject: Db3x_mmap: changed warning lavel to w4 git-svn-id: http://svn.miranda-ng.org/main/trunk@11418 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Db3x_mmap/src/dbmodulechain.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'plugins/Db3x_mmap/src/dbmodulechain.cpp') diff --git a/plugins/Db3x_mmap/src/dbmodulechain.cpp b/plugins/Db3x_mmap/src/dbmodulechain.cpp index 603f55512b..8b2d0ec6ae 100644 --- a/plugins/Db3x_mmap/src/dbmodulechain.cpp +++ b/plugins/Db3x_mmap/src/dbmodulechain.cpp @@ -23,39 +23,39 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "commonheaders.h" -void CDb3Mmap::AddToList(char *name, DWORD len, DWORD ofs) +void CDb3Mmap::AddToList(char *name, DWORD ofs) { - ModuleName *mn = (ModuleName*)HeapAlloc(m_hModHeap,0,sizeof(ModuleName)); + ModuleName *mn = (ModuleName*)HeapAlloc(m_hModHeap, 0, sizeof(ModuleName)); mn->name = name; mn->ofs = ofs; if (m_lMods.getIndex(mn) != -1) - DatabaseCorruption( _T("%s (Module Name not unique)")); + DatabaseCorruption(_T("%s (Module Name not unique)")); m_lMods.insert(mn); if (m_lOfs.getIndex(mn) != -1) - DatabaseCorruption( _T("%s (Module Offset not unique)")); + DatabaseCorruption(_T("%s (Module Offset not unique)")); m_lOfs.insert(mn); } int CDb3Mmap::InitModuleNames(void) { DWORD ofsThis = m_dbHeader.ofsModuleNames; - DBModuleName *dbmn = (struct DBModuleName*)DBRead(ofsThis,sizeof(struct DBModuleName),NULL); + DBModuleName *dbmn = (struct DBModuleName*)DBRead(ofsThis, NULL); while (ofsThis) { if (dbmn->signature != DBMODULENAME_SIGNATURE) DatabaseCorruption(NULL); int nameLen = dbmn->cbName; - char *mod = (char*)HeapAlloc(m_hModHeap,0,nameLen+1); - memcpy(mod,DBRead(ofsThis + offsetof(struct DBModuleName,name),nameLen,NULL),nameLen); + char *mod = (char*)HeapAlloc(m_hModHeap, 0, nameLen + 1); + memcpy(mod, DBRead(ofsThis + offsetof(struct DBModuleName, name), NULL), nameLen); mod[nameLen] = 0; - AddToList(mod, nameLen, ofsThis); + AddToList(mod, ofsThis); ofsThis = dbmn->ofsNext; - dbmn = (struct DBModuleName*)DBRead(ofsThis,sizeof(struct DBModuleName),NULL); + dbmn = (struct DBModuleName*)DBRead(ofsThis, NULL); } return 0; } @@ -103,8 +103,8 @@ DWORD CDb3Mmap::GetModuleNameOfs(const char *szName) // add to cache char *mod = (char*)HeapAlloc(m_hModHeap, 0, nameLen + 1); - strcpy(mod,szName); - AddToList(mod, nameLen, ofsNew); + strcpy(mod, szName); + AddToList(mod, ofsNew); // quit return ofsNew; @@ -115,7 +115,7 @@ char* CDb3Mmap::GetModuleNameByOfs(DWORD ofs) if (m_lastmn && m_lastmn->ofs == ofs) return m_lastmn->name; - ModuleName mn = {NULL, ofs}; + ModuleName mn = { NULL, ofs }; int index = m_lOfs.getIndex(&mn); if (index != -1) { ModuleName *pmn = m_lOfs[index]; -- cgit v1.2.3