summaryrefslogtreecommitdiff
path: root/plugins/Db3x_mmap/src/dbtool
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Db3x_mmap/src/dbtool')
-rw-r--r--plugins/Db3x_mmap/src/dbtool/contactchain.cpp10
-rw-r--r--plugins/Db3x_mmap/src/dbtool/eventchain.cpp10
-rw-r--r--plugins/Db3x_mmap/src/dbtool/finaltasks.cpp2
-rw-r--r--plugins/Db3x_mmap/src/dbtool/initialchecks.cpp12
-rw-r--r--plugins/Db3x_mmap/src/dbtool/modulechain.cpp6
-rw-r--r--plugins/Db3x_mmap/src/dbtool/settingschain.cpp4
-rw-r--r--plugins/Db3x_mmap/src/dbtool/user.cpp2
7 files changed, 23 insertions, 23 deletions
diff --git a/plugins/Db3x_mmap/src/dbtool/contactchain.cpp b/plugins/Db3x_mmap/src/dbtool/contactchain.cpp
index 36dc7cf239..639015f67c 100644
--- a/plugins/Db3x_mmap/src/dbtool/contactchain.cpp
+++ b/plugins/Db3x_mmap/src/dbtool/contactchain.cpp
@@ -42,7 +42,7 @@ int CDb3Mmap::WorkContactChain(int firstTime)
switch (phase) {
case 0:
if (ofsThisContact == 0) {
-LBL_FinishUp:
+ LBL_FinishUp:
if (contactCount != m_dbHeader.contactCount)
cb->pfnAddLogMessage(STATUS_WARNING, TranslateT("Contact count marked wrongly: correcting"));
m_dbHeader.contactCount = contactCount;
@@ -78,16 +78,16 @@ LBL_FinishUp:
contactCount++;
phase++; first = 1;
- // fall thru
+ // fall thru
case 1:
- ret = WorkSettingsChain(ofsDestThis, &dbc, first);
+ ret = WorkSettingsChain(&dbc, first);
if (ret == ERROR_NO_MORE_ITEMS) {
phase++; first = 1;
}
else if (ret) return ret;
else break;
- // fall thru
+ // fall thru
case 2:
ret = WorkEventChain(ofsDestThis, &dbc, first);
if (ret == ERROR_NO_MORE_ITEMS) {
@@ -96,7 +96,7 @@ LBL_FinishUp:
else if (ret) return ret;
else break;
- // fall thru
+ // fall thru
case 3:
if (WriteSegment(ofsDestThis, &dbc, sizeof(DBContact)) == WS_ERROR)
return ERROR_HANDLE_DISK_FULL;
diff --git a/plugins/Db3x_mmap/src/dbtool/eventchain.cpp b/plugins/Db3x_mmap/src/dbtool/eventchain.cpp
index 1204c54cf9..1b0ea041be 100644
--- a/plugins/Db3x_mmap/src/dbtool/eventchain.cpp
+++ b/plugins/Db3x_mmap/src/dbtool/eventchain.cpp
@@ -195,7 +195,7 @@ int CDb3Mmap::WorkEventChain(DWORD ofsContact, DBContact *dbc, int firstTime)
dbeOld.ofsPrev = 0;
lastTimestamp = dbeOld.timestamp;
}
-
+
if (dbeOld.flags & 1)
dbeOld.flags &= ~1;
@@ -269,8 +269,8 @@ int CDb3Mmap::WorkEventChain(DWORD ofsContact, DBContact *dbc, int firstTime)
if (dbePrev) {
if (dbePrev->cbBlob == dbeNew->cbBlob &&
- dbePrev->ofsModuleName == dbeNew->ofsModuleName &&
- dbePrev->wEventType == dbeNew->wEventType &&
+ dbePrev->ofsModuleName == dbeNew->ofsModuleName &&
+ dbePrev->wEventType == dbeNew->wEventType &&
(dbePrev->flags & DBEF_SENT) == (dbeNew->flags & DBEF_SENT) && !memcmp(dbePrev->blob, dbeNew->blob, dbeNew->cbBlob))
{
cb->pfnAddLogMessage(STATUS_WARNING, TranslateT("Duplicate event was found: skipping"));
@@ -286,8 +286,8 @@ int CDb3Mmap::WorkEventChain(DWORD ofsContact, DBContact *dbc, int firstTime)
}
else if (!firstTime && dbeNew->timestamp < lastTimestamp) {
DWORD found = 0;
- DBEvent dbeTmp;
- DWORD ofsTmp;
+ DBEvent dbeTmp = { 0 };
+ DWORD ofsTmp = 0;
if (cb->bCheckOnly) {
if (!cb->bAggressive) {
diff --git a/plugins/Db3x_mmap/src/dbtool/finaltasks.cpp b/plugins/Db3x_mmap/src/dbtool/finaltasks.cpp
index 5aa01e230c..4151031e27 100644
--- a/plugins/Db3x_mmap/src/dbtool/finaltasks.cpp
+++ b/plugins/Db3x_mmap/src/dbtool/finaltasks.cpp
@@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "..\commonheaders.h"
-int CDb3Mmap::WorkFinalTasks(int firstTime)
+int CDb3Mmap::WorkFinalTasks(int)
{
FreeModuleChain();
cb->pfnAddLogMessage(STATUS_MESSAGE, TranslateT("Processing final tasks"));
diff --git a/plugins/Db3x_mmap/src/dbtool/initialchecks.cpp b/plugins/Db3x_mmap/src/dbtool/initialchecks.cpp
index ec1339d787..d7befbf8bc 100644
--- a/plugins/Db3x_mmap/src/dbtool/initialchecks.cpp
+++ b/plugins/Db3x_mmap/src/dbtool/initialchecks.cpp
@@ -22,14 +22,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
int CDb3Mmap::WorkInitialCheckHeaders()
{
if (memcmp(m_dbHeader.signature, &dbSignatureU, sizeof(m_dbHeader.signature)) &&
- memcmp(m_dbHeader.signature, &dbSignatureE, sizeof(m_dbHeader.signature)) &&
- memcmp(m_dbHeader.signature, &dbSignatureIM, sizeof(m_dbHeader.signature)) &&
- memcmp(m_dbHeader.signature, &dbSignatureSA, sizeof(m_dbHeader.signature)))
+ memcmp(m_dbHeader.signature, &dbSignatureE, sizeof(m_dbHeader.signature)) &&
+ memcmp(m_dbHeader.signature, &dbSignatureIM, sizeof(m_dbHeader.signature)) &&
+ memcmp(m_dbHeader.signature, &dbSignatureSA, sizeof(m_dbHeader.signature)))
{
cb->pfnAddLogMessage(STATUS_FATAL, TranslateT("Database signature is corrupted, automatic repair is impossible"));
return ERROR_BAD_FORMAT;
}
-
+
switch (m_dbHeader.version) {
case DB_OLD_VERSION:
case DB_094_VERSION:
@@ -41,11 +41,11 @@ int CDb3Mmap::WorkInitialCheckHeaders()
cb->pfnAddLogMessage(STATUS_FATAL, TranslateT("Database version doesn't match this driver's one. Convert a database first"));
return ERROR_BAD_FORMAT;
}
-
+
return ERROR_SUCCESS;
}
-int CDb3Mmap::WorkInitialChecks(int firstTime)
+int CDb3Mmap::WorkInitialChecks(int)
{
sourceFileSize = GetFileSize(m_hDbFile, NULL);
if (sourceFileSize == 0) {
diff --git a/plugins/Db3x_mmap/src/dbtool/modulechain.cpp b/plugins/Db3x_mmap/src/dbtool/modulechain.cpp
index 135935e4ed..522532d8f4 100644
--- a/plugins/Db3x_mmap/src/dbtool/modulechain.cpp
+++ b/plugins/Db3x_mmap/src/dbtool/modulechain.cpp
@@ -20,13 +20,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "..\commonheaders.h"
struct ModChainEntry {
- DWORD ofsOld,ofsNew;
+ DWORD ofsOld, ofsNew;
int size;
char name[257];
} static *modChain = NULL;
static int modChainCount;
static DWORD ofsCurrent;
-static int phase,iCurrentModName;
+static int phase, iCurrentModName;
static DWORD ofsLast;
static int last_mod = 0;
@@ -87,7 +87,7 @@ int CDb3Mmap::WorkModuleChain(int firstTime)
return ERROR_NO_MORE_ITEMS;
if ((modChain[iCurrentModName].ofsNew = WriteSegment(WSOFS_END, newModName, modChain[iCurrentModName].size)) == WS_ERROR)
return ERROR_HANDLE_DISK_FULL;
-
+
// check duplicated modulenames
int i, n = 0;
for (i = iCurrentModName + 1; i < modChainCount; i++)
diff --git a/plugins/Db3x_mmap/src/dbtool/settingschain.cpp b/plugins/Db3x_mmap/src/dbtool/settingschain.cpp
index 8911f86e07..01630ca3d2 100644
--- a/plugins/Db3x_mmap/src/dbtool/settingschain.cpp
+++ b/plugins/Db3x_mmap/src/dbtool/settingschain.cpp
@@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
static DWORD ofsThisSettings, ofsDestPrevSettings;
-int CDb3Mmap::WorkSettingsChain(DWORD ofsContact, DBContact *dbc, int firstTime)
+int CDb3Mmap::WorkSettingsChain(DBContact *dbc, int firstTime)
{
DWORD ofsDestThis;
int ret;
@@ -57,7 +57,7 @@ int CDb3Mmap::WorkSettingsChain(DWORD ofsContact, DBContact *dbc, int firstTime)
ofsThisSettings = dbcsOld.ofsNext;
return ERROR_SUCCESS;
}
-
+
if (dbcsNew->blob[0] == 0) {
cb->pfnAddLogMessage(STATUS_MESSAGE, TranslateT("Empty settings group at %08X: skipping"), ofsThisSettings);
ofsThisSettings = dbcsOld.ofsNext;
diff --git a/plugins/Db3x_mmap/src/dbtool/user.cpp b/plugins/Db3x_mmap/src/dbtool/user.cpp
index 4f254bdbb9..2f0a317e90 100644
--- a/plugins/Db3x_mmap/src/dbtool/user.cpp
+++ b/plugins/Db3x_mmap/src/dbtool/user.cpp
@@ -54,7 +54,7 @@ int CDb3Mmap::WorkUser(int firstTime)
int ret;
switch (phase) {
case 0:
- ret = WorkSettingsChain(ofsUser, &user, first);
+ ret = WorkSettingsChain(&user, first);
if (ret == ERROR_NO_MORE_ITEMS) {
phase++; first = 1;
}