summaryrefslogtreecommitdiffstats
path: root/tools/idevicebackup2.c
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/idevicebackup2.c
parentf322dfcb9718b80f9410ebafd8d159e5fc116a88 (diff)
downloadlibimobiledevice-662ef2073cb5ece7bb558700f344ea10b431fb64.tar.gz
libimobiledevice-662ef2073cb5ece7bb558700f344ea10b431fb64.tar.bz2
tools: Fix compiler warnings for idevicebackup and idevicebackup2
Diffstat (limited to 'tools/idevicebackup2.c')
-rw-r--r--tools/idevicebackup2.c9
1 files changed, 5 insertions, 4 deletions
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 @@
28#include <unistd.h> 28#include <unistd.h>
29#include <dirent.h> 29#include <dirent.h>
30#include <libgen.h> 30#include <libgen.h>
31#include <ctype.h>
32#include <time.h>
31 33
32#include <libimobiledevice/libimobiledevice.h> 34#include <libimobiledevice/libimobiledevice.h>
33#include <libimobiledevice/lockdown.h> 35#include <libimobiledevice/lockdown.h>
@@ -161,7 +163,7 @@ static void mobilebackup_afc_get_file_contents(const char *filename, char **data
161static char *str_toupper(char* str) 163static char *str_toupper(char* str)
162{ 164{
163 char *res = strdup(str); 165 char *res = strdup(str);
164 int i; 166 unsigned int i;
165 for (i = 0; i < strlen(res); i++) { 167 for (i = 0; i < strlen(res); i++) {
166 res[i] = toupper(res[i]); 168 res[i] = toupper(res[i]);
167 } 169 }
@@ -177,7 +179,7 @@ static int __mkdir(const char* path, int mode)
177#endif 179#endif
178} 180}
179 181
180int mkdir_with_parents(const char *dir, int mode) 182static int mkdir_with_parents(const char *dir, int mode)
181{ 183{
182 if (!dir) return -1; 184 if (!dir) return -1;
183 if (__mkdir(dir, mode) == 0) { 185 if (__mkdir(dir, mode) == 0) {
@@ -200,7 +202,7 @@ int mkdir_with_parents(const char *dir, int mode)
200 return res; 202 return res;
201} 203}
202 204
203char* build_path(const char* elem, ...) 205static char* build_path(const char* elem, ...)
204{ 206{
205 if (!elem) return NULL; 207 if (!elem) return NULL;
206 va_list args; 208 va_list args;
@@ -1662,7 +1664,6 @@ checkpoint:
1662 if (src && dst) { 1664 if (src && dst) {
1663 char *oldpath = build_path(backup_directory, src, NULL); 1665 char *oldpath = build_path(backup_directory, src, NULL);
1664 char *newpath = build_path(backup_directory, dst, NULL); 1666 char *newpath = build_path(backup_directory, dst, NULL);
1665 struct stat st;
1666 1667
1667 PRINT_VERBOSE(1, "Copying '%s' to '%s'\n", src, dst); 1668 PRINT_VERBOSE(1, "Copying '%s' to '%s'\n", src, dst);
1668 1669