From c3daa2a2932d12a76c788bbaf42e42110e4b317f Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Fri, 24 Jul 2009 21:35:13 +0200 Subject: [PATCH] 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 --- dev/afccheck.c | 2 +- dev/iphoneinfo.c | 2 +- dev/main.c | 2 +- src/AFC.c | 2 +- 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 { } param; -void check_afc(gpointer data) +static void check_afc(gpointer data) { //prepare a buffer unsigned int buffersize = BUFFER_SIZE * sizeof(unsigned int); diff --git a/dev/iphoneinfo.c b/dev/iphoneinfo.c index 33ab3ac..46fcc77 100644 --- a/dev/iphoneinfo.c +++ b/dev/iphoneinfo.c @@ -226,7 +226,7 @@ void plist_node_to_string(plist_t *node) case PLIST_UINT: plist_get_uint_val(node, &u); - printf("%llu\n", u); + printf("%llu\n", (long long)u); break; case PLIST_REAL: diff --git a/dev/main.c b/dev/main.c index 33ebc2d..1db94a0 100644 --- a/dev/main.c +++ b/dev/main.c @@ -167,7 +167,7 @@ int main(int argc, char *argv[]) if (IPHONE_E_SUCCESS == afc_open_file(afc, "/readme.libiphone.fx", AFC_FOPEN_RDONLY, &my_file) && my_file) { - printf("A file size: %llu\n", fsize); + printf("A file size: %llu\n", (long long)fsize); char *file_data = (char *) malloc(sizeof(char) * fsize); afc_read_file(afc, my_file, file_data, fsize, &bytes); if (bytes > 0) { diff --git a/src/AFC.c b/src/AFC.c index cd120fc..061b1ef 100644 --- a/src/AFC.c +++ b/src/AFC.c @@ -428,7 +428,7 @@ static int receive_AFC_data(afc_client_t client, char **dump_here) *dump_here = NULL; log_debug_msg("%s: WARNING: Unknown operation code received 0x%llx param1=%lld\n", __func__, header.operation, param1); - fprintf(stderr, "%s: WARNING: Unknown operation code received 0x%llx param1=%lld\n", __func__, header.operation, param1); + fprintf(stderr, "%s: WARNING: Unknown operation code received 0x%llx param1=%lld\n", __func__, (long long)header.operation, (long long)param1); return -1; } 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 @@ #include #include #include +#include #include #include #include "NotificationProxy.h" -- 1.6.2.4