summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2012-03-21 14:55:15 +0100
committerGravatar Martin Szulecki2012-03-21 14:55:15 +0100
commit662ef2073cb5ece7bb558700f344ea10b431fb64 (patch)
tree9a2289cb95a2cd89cf12651a18274a0c0f51a96e /tools
parentf322dfcb9718b80f9410ebafd8d159e5fc116a88 (diff)
downloadlibimobiledevice-662ef2073cb5ece7bb558700f344ea10b431fb64.tar.gz
libimobiledevice-662ef2073cb5ece7bb558700f344ea10b431fb64.tar.bz2
tools: Fix compiler warnings for idevicebackup and idevicebackup2
Diffstat (limited to 'tools')
-rw-r--r--tools/idevicebackup.c6
-rw-r--r--tools/idevicebackup2.c9
2 files changed, 9 insertions, 6 deletions
diff --git a/tools/idevicebackup.c b/tools/idevicebackup.c
index 159f3b1..26771f8 100644
--- a/tools/idevicebackup.c
+++ b/tools/idevicebackup.c
@@ -35,6 +35,8 @@
#include <gcrypt.h>
#endif
#include <unistd.h>
+#include <ctype.h>
+#include <time.h>
#include <libimobiledevice/libimobiledevice.h>
#include <libimobiledevice/lockdown.h>
@@ -228,14 +230,14 @@ static void notify_cb(const char *notification, void *userdata)
static char *str_toupper(char* str)
{
char *res = strdup(str);
- int i;
+ unsigned int i;
for (i = 0; i < strlen(res); i++) {
res[i] = toupper(res[i]);
}
return res;
}
-char* build_path(const char* elem, ...)
+static char* build_path(const char* elem, ...)
{
if (!elem) return NULL;
va_list args;
diff --git a/tools/idevicebackup2.c b/tools/idevicebackup2.c
index 2c77e1f..b0f9d55 100644
--- a/tools/idevicebackup2.c
+++ b/tools/idevicebackup2.c
@@ -28,6 +28,8 @@
#include <unistd.h>
#include <dirent.h>
#include <libgen.h>
+#include <ctype.h>
+#include <time.h>
#include <libimobiledevice/libimobiledevice.h>
#include <libimobiledevice/lockdown.h>
@@ -161,7 +163,7 @@ static void mobilebackup_afc_get_file_contents(const char *filename, char **data
static char *str_toupper(char* str)
{
char *res = strdup(str);
- int i;
+ unsigned int i;
for (i = 0; i < strlen(res); i++) {
res[i] = toupper(res[i]);
}
@@ -177,7 +179,7 @@ static int __mkdir(const char* path, int mode)
#endif
}
-int mkdir_with_parents(const char *dir, int mode)
+static int mkdir_with_parents(const char *dir, int mode)
{
if (!dir) return -1;
if (__mkdir(dir, mode) == 0) {
@@ -200,7 +202,7 @@ int mkdir_with_parents(const char *dir, int mode)
return res;
}
-char* build_path(const char* elem, ...)
+static char* build_path(const char* elem, ...)
{
if (!elem) return NULL;
va_list args;
@@ -1662,7 +1664,6 @@ checkpoint:
if (src && dst) {
char *oldpath = build_path(backup_directory, src, NULL);
char *newpath = build_path(backup_directory, dst, NULL);
- struct stat st;
PRINT_VERBOSE(1, "Copying '%s' to '%s'\n", src, dst);