diff options
| author | 2013-05-23 20:17:13 +0200 | |
|---|---|---|
| committer | 2013-05-23 20:17:13 +0200 | |
| commit | cfa1eb9f7d472ad0248e60000133b8f23a5f8125 (patch) | |
| tree | 925900325315a7e9243afdefc92b4bbb7653d425 | |
| parent | b1c41365ef0dbf294b12b691d48d6988e578d66d (diff) | |
| download | libimobiledevice-cfa1eb9f7d472ad0248e60000133b8f23a5f8125.tar.gz libimobiledevice-cfa1eb9f7d472ad0248e60000133b8f23a5f8125.tar.bz2 | |
Silence compiler warnings for win32 builds
| -rw-r--r-- | common/debug.c | 2 | ||||
| -rw-r--r-- | common/userpref.c | 2 | ||||
| -rw-r--r-- | tools/idevicebackup2.c | 3 | ||||
| -rw-r--r-- | tools/ideviceimagemounter.c | 3 | ||||
| -rw-r--r-- | tools/ideviceinfo.c | 3 |
5 files changed, 8 insertions, 5 deletions
diff --git a/common/debug.c b/common/debug.c index 0bb87a2..67e2fc2 100644 --- a/common/debug.c +++ b/common/debug.c | |||
| @@ -116,7 +116,7 @@ inline void debug_buffer(const char *data, const int length) | |||
| 116 | fprintf(stderr, " "); | 116 | fprintf(stderr, " "); |
| 117 | continue; | 117 | continue; |
| 118 | } | 118 | } |
| 119 | fprintf(stderr, "%02hhx ", *(data + i + j)); | 119 | fprintf(stderr, "%02x ", *(data + i + j)); |
| 120 | } | 120 | } |
| 121 | fprintf(stderr, " | "); | 121 | fprintf(stderr, " | "); |
| 122 | for (j = 0; j < 16; j++) { | 122 | for (j = 0; j < 16; j++) { |
diff --git a/common/userpref.c b/common/userpref.c index 0e774b7..d363b0e 100644 --- a/common/userpref.c +++ b/common/userpref.c | |||
| @@ -102,6 +102,7 @@ static char *userpref_utf16_to_utf8(wchar_t *unistr, long len, long *items_read, | |||
| 102 | } | 102 | } |
| 103 | #endif | 103 | #endif |
| 104 | 104 | ||
| 105 | #ifndef WIN32 | ||
| 105 | static const char *userpref_get_tmp_dir() | 106 | static const char *userpref_get_tmp_dir() |
| 106 | { | 107 | { |
| 107 | const char *cdir = getenv("TMPDIR"); | 108 | const char *cdir = getenv("TMPDIR"); |
| @@ -115,6 +116,7 @@ static const char *userpref_get_tmp_dir() | |||
| 115 | return cdir; | 116 | return cdir; |
| 116 | return "/tmp"; | 117 | return "/tmp"; |
| 117 | } | 118 | } |
| 119 | #endif | ||
| 118 | 120 | ||
| 119 | static const char *userpref_get_config_dir() | 121 | static const char *userpref_get_config_dir() |
| 120 | { | 122 | { |
diff --git a/tools/idevicebackup2.c b/tools/idevicebackup2.c index a0ffc9b..697e276 100644 --- a/tools/idevicebackup2.c +++ b/tools/idevicebackup2.c | |||
| @@ -47,6 +47,7 @@ | |||
| 47 | 47 | ||
| 48 | #ifdef WIN32 | 48 | #ifdef WIN32 |
| 49 | #include <windows.h> | 49 | #include <windows.h> |
| 50 | #include <conio.h> | ||
| 50 | #define sleep(x) Sleep(x*1000) | 51 | #define sleep(x) Sleep(x*1000) |
| 51 | #else | 52 | #else |
| 52 | #include <termios.h> | 53 | #include <termios.h> |
| @@ -1968,7 +1969,6 @@ checkpoint: | |||
| 1968 | char *oldpath = build_path(backup_directory, key, NULL); | 1969 | char *oldpath = build_path(backup_directory, key, NULL); |
| 1969 | 1970 | ||
| 1970 | #ifdef WIN32 | 1971 | #ifdef WIN32 |
| 1971 | struct stat st; | ||
| 1972 | if ((stat(newpath, &st) == 0) && S_ISDIR(st.st_mode)) | 1972 | if ((stat(newpath, &st) == 0) && S_ISDIR(st.st_mode)) |
| 1973 | RemoveDirectory(newpath); | 1973 | RemoveDirectory(newpath); |
| 1974 | else | 1974 | else |
| @@ -2023,7 +2023,6 @@ checkpoint: | |||
| 2023 | char *newpath = build_path(backup_directory, str, NULL); | 2023 | char *newpath = build_path(backup_directory, str, NULL); |
| 2024 | free(str); | 2024 | free(str); |
| 2025 | #ifdef WIN32 | 2025 | #ifdef WIN32 |
| 2026 | struct stat st; | ||
| 2027 | int res = 0; | 2026 | int res = 0; |
| 2028 | if ((stat(newpath, &st) == 0) && S_ISDIR(st.st_mode)) | 2027 | if ((stat(newpath, &st) == 0) && S_ISDIR(st.st_mode)) |
| 2029 | res = RemoveDirectory(newpath); | 2028 | res = RemoveDirectory(newpath); |
diff --git a/tools/ideviceimagemounter.c b/tools/ideviceimagemounter.c index e57d83a..09363fd 100644 --- a/tools/ideviceimagemounter.c +++ b/tools/ideviceimagemounter.c | |||
| @@ -29,6 +29,7 @@ | |||
| 29 | #include <libgen.h> | 29 | #include <libgen.h> |
| 30 | #include <time.h> | 30 | #include <time.h> |
| 31 | #include <sys/time.h> | 31 | #include <sys/time.h> |
| 32 | #include <inttypes.h> | ||
| 32 | 33 | ||
| 33 | #include <libimobiledevice/libimobiledevice.h> | 34 | #include <libimobiledevice/libimobiledevice.h> |
| 34 | #include <libimobiledevice/lockdown.h> | 35 | #include <libimobiledevice/lockdown.h> |
| @@ -182,7 +183,7 @@ static void plist_node_to_string(plist_t node) | |||
| 182 | 183 | ||
| 183 | case PLIST_UINT: | 184 | case PLIST_UINT: |
| 184 | plist_get_uint_val(node, &u); | 185 | plist_get_uint_val(node, &u); |
| 185 | printf("%llu\n", (long long)u); | 186 | printf("%"PRIu64"\n", (long long)u); |
| 186 | break; | 187 | break; |
| 187 | 188 | ||
| 188 | case PLIST_REAL: | 189 | case PLIST_REAL: |
diff --git a/tools/ideviceinfo.c b/tools/ideviceinfo.c index c8d4cac..0c23d3c 100644 --- a/tools/ideviceinfo.c +++ b/tools/ideviceinfo.c | |||
| @@ -25,6 +25,7 @@ | |||
| 25 | #include <stdlib.h> | 25 | #include <stdlib.h> |
| 26 | #include <time.h> | 26 | #include <time.h> |
| 27 | #include <sys/time.h> | 27 | #include <sys/time.h> |
| 28 | #include <inttypes.h> | ||
| 28 | 29 | ||
| 29 | #include <libimobiledevice/libimobiledevice.h> | 30 | #include <libimobiledevice/libimobiledevice.h> |
| 30 | #include <libimobiledevice/lockdown.h> | 31 | #include <libimobiledevice/lockdown.h> |
| @@ -177,7 +178,7 @@ static void plist_node_to_string(plist_t node) | |||
| 177 | 178 | ||
| 178 | case PLIST_UINT: | 179 | case PLIST_UINT: |
| 179 | plist_get_uint_val(node, &u); | 180 | plist_get_uint_val(node, &u); |
| 180 | printf("%llu\n", (long long)u); | 181 | printf("%"PRIu64"\n", (long long)u); |
| 181 | break; | 182 | break; |
| 182 | 183 | ||
| 183 | case PLIST_REAL: | 184 | case PLIST_REAL: |
