diff options
| author | 2009-07-24 21:35:13 +0200 | |
|---|---|---|
| committer | 2009-07-26 19:21:08 -0700 | |
| commit | 53ed3be0463522cc3f8028def453c78be10f165b (patch) | |
| tree | e158cdce40e8d0dc23d6d374ed18c78714fe37de | |
| parent | f6eda5e6ba53e77389b68e7a26f961c0f5025e4e (diff) | |
| download | libimobiledevice-53ed3be0463522cc3f8028def453c78be10f165b.tar.gz libimobiledevice-53ed3be0463522cc3f8028def453c78be10f165b.tar.bz2 | |
fix most -Wall warnings
add missing includes, add some casts to avoid format warnings,
mark one function as static. There are still warnings about
unused argc/argv
[#61 state:resolved]
Signed-off-by: Matt Colyer <matt@colyer.name>
| -rw-r--r-- | dev/afccheck.c | 2 | ||||
| -rw-r--r-- | dev/iphoneinfo.c | 2 | ||||
| -rw-r--r-- | dev/main.c | 2 | ||||
| -rw-r--r-- | src/AFC.c | 2 | ||||
| -rw-r--r-- | src/NotificationProxy.c | 1 |
5 files changed, 5 insertions, 4 deletions
diff --git a/dev/afccheck.c b/dev/afccheck.c index 9174e32..cf75e71 100644 --- a/dev/afccheck.c +++ b/dev/afccheck.c | |||
| @@ -38,7 +38,7 @@ typedef struct { | |||
| 38 | } param; | 38 | } param; |
| 39 | 39 | ||
| 40 | 40 | ||
| 41 | void check_afc(gpointer data) | 41 | static void check_afc(gpointer data) |
| 42 | { | 42 | { |
| 43 | //prepare a buffer | 43 | //prepare a buffer |
| 44 | unsigned int buffersize = BUFFER_SIZE * sizeof(unsigned int); | 44 | unsigned int buffersize = BUFFER_SIZE * sizeof(unsigned int); |
diff --git a/dev/iphoneinfo.c b/dev/iphoneinfo.c index 3dfda5d..9d690f9 100644 --- a/dev/iphoneinfo.c +++ b/dev/iphoneinfo.c | |||
| @@ -206,7 +206,7 @@ void plist_node_to_string(plist_t *node) | |||
| 206 | 206 | ||
| 207 | case PLIST_UINT: | 207 | case PLIST_UINT: |
| 208 | plist_get_uint_val(node, &u); | 208 | plist_get_uint_val(node, &u); |
| 209 | printf("%llu\n", u); | 209 | printf("%llu\n", (long long)u); |
| 210 | break; | 210 | break; |
| 211 | 211 | ||
| 212 | case PLIST_REAL: | 212 | case PLIST_REAL: |
| @@ -167,7 +167,7 @@ int main(int argc, char *argv[]) | |||
| 167 | 167 | ||
| 168 | if (IPHONE_E_SUCCESS == | 168 | if (IPHONE_E_SUCCESS == |
| 169 | afc_open_file(afc, "/readme.libiphone.fx", AFC_FOPEN_RDONLY, &my_file) && my_file) { | 169 | afc_open_file(afc, "/readme.libiphone.fx", AFC_FOPEN_RDONLY, &my_file) && my_file) { |
| 170 | printf("A file size: %llu\n", fsize); | 170 | printf("A file size: %llu\n", (long long)fsize); |
| 171 | char *file_data = (char *) malloc(sizeof(char) * fsize); | 171 | char *file_data = (char *) malloc(sizeof(char) * fsize); |
| 172 | afc_read_file(afc, my_file, file_data, fsize, &bytes); | 172 | afc_read_file(afc, my_file, file_data, fsize, &bytes); |
| 173 | if (bytes > 0) { | 173 | if (bytes > 0) { |
| @@ -425,7 +425,7 @@ static int receive_AFC_data(afc_client_t client, char **dump_here) | |||
| 425 | *dump_here = NULL; | 425 | *dump_here = NULL; |
| 426 | 426 | ||
| 427 | log_debug_msg("%s: WARNING: Unknown operation code received 0x%llx param1=%lld\n", __func__, header.operation, param1); | 427 | log_debug_msg("%s: WARNING: Unknown operation code received 0x%llx param1=%lld\n", __func__, header.operation, param1); |
| 428 | fprintf(stderr, "%s: WARNING: Unknown operation code received 0x%llx param1=%lld\n", __func__, header.operation, param1); | 428 | fprintf(stderr, "%s: WARNING: Unknown operation code received 0x%llx param1=%lld\n", __func__, (long long)header.operation, (long long)param1); |
| 429 | 429 | ||
| 430 | return -1; | 430 | return -1; |
| 431 | } | 431 | } |
diff --git a/src/NotificationProxy.c b/src/NotificationProxy.c index 374420c..511b07f 100644 --- a/src/NotificationProxy.c +++ b/src/NotificationProxy.c | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | #include <string.h> | 22 | #include <string.h> |
| 23 | #include <stdio.h> | 23 | #include <stdio.h> |
| 24 | #include <stdlib.h> | 24 | #include <stdlib.h> |
| 25 | #include <unistd.h> | ||
| 25 | #include <arpa/inet.h> | 26 | #include <arpa/inet.h> |
| 26 | #include <plist/plist.h> | 27 | #include <plist/plist.h> |
| 27 | #include "NotificationProxy.h" | 28 | #include "NotificationProxy.h" |
