summaryrefslogtreecommitdiff
path: root/plugins/Db_autobackups/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-06 10:23:34 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-06 10:23:34 +0000
commit77778c2b9236077c7e79f06aa798affa2f90a1db (patch)
tree84522dfa63e6f5982614e61a0b1ff2467620d441 /plugins/Db_autobackups/src
parent70cbc6e77f935b7116c1080033f5d7d5b604b5a7 (diff)
fix for some warnings
git-svn-id: http://svn.miranda-ng.org/main/trunk@14023 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Db_autobackups/src')
-rw-r--r--plugins/Db_autobackups/src/backup.cpp3
-rw-r--r--plugins/Db_autobackups/src/options.cpp4
-rw-r--r--plugins/Db_autobackups/src/options.h2
3 files changed, 5 insertions, 4 deletions
diff --git a/plugins/Db_autobackups/src/backup.cpp b/plugins/Db_autobackups/src/backup.cpp
index d18693c2f0..b63690ac72 100644
--- a/plugins/Db_autobackups/src/backup.cpp
+++ b/plugins/Db_autobackups/src/backup.cpp
@@ -174,7 +174,6 @@ int Comp(const void *i, const void *j)
int RotateBackups(TCHAR *backupfolder, TCHAR *dbname)
{
- size_t i = 0;
backupFile *bf = NULL, *bftmp;
HANDLE hFind;
TCHAR backupfolderTmp[MAX_PATH];
@@ -186,6 +185,8 @@ int RotateBackups(TCHAR *backupfolder, TCHAR *dbname)
hFind = FindFirstFile(backupfolderTmp, &FindFileData);
if (hFind == INVALID_HANDLE_VALUE)
return 0;
+
+ int i = 0;
do {
if (FindFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
continue;
diff --git a/plugins/Db_autobackups/src/options.cpp b/plugins/Db_autobackups/src/options.cpp
index f274d346de..d02bb47032 100644
--- a/plugins/Db_autobackups/src/options.cpp
+++ b/plugins/Db_autobackups/src/options.cpp
@@ -56,7 +56,7 @@ int LoadOptions(void)
else
mir_sntprintf(options.folder, SIZEOF(options.folder), _T("%s%s"), DIR, SUB_DIR);
}
- options.num_backups = (unsigned int)db_get_w(0, "AutoBackups", "NumBackups", 3);
+ options.num_backups = db_get_w(0, "AutoBackups", "NumBackups", 3);
options.disable_progress = (BOOL)db_get_b(0, "AutoBackups", "NoProgress", 0);
options.disable_popups = (BOOL)db_get_b(0, "AutoBackups", "NoPopups", 0);
@@ -92,7 +92,7 @@ int SaveOptions(void)
mir_sntprintf(options.folder, SIZEOF(options.folder), _T("%s\\%s"), profilePath, prof_dir);
}
mir_free(tmp);
- db_set_w(0, "AutoBackups", "NumBackups", (WORD)options.num_backups);
+ db_set_w(0, "AutoBackups", "NumBackups", options.num_backups);
db_set_b(0, "AutoBackups", "NoProgress", (BYTE)options.disable_progress);
db_set_b(0, "AutoBackups", "NoPopups", (BYTE)options.disable_popups);
db_set_b(0, "AutoBackups", "UseZip", (BYTE)options.use_zip);
diff --git a/plugins/Db_autobackups/src/options.h b/plugins/Db_autobackups/src/options.h
index d497912330..1b1a94938a 100644
--- a/plugins/Db_autobackups/src/options.h
+++ b/plugins/Db_autobackups/src/options.h
@@ -30,7 +30,7 @@ typedef struct Options_tag {
unsigned int period;
PeriodType period_type;
TCHAR folder[MAX_PATH];
- size_t num_backups;
+ int num_backups;
BOOL disable_progress;
BOOL disable_popups;
BOOL use_zip;