From 2f2b8d7ea552cbdb5a2cf17ceba364681350f3bb Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Sun, 10 Aug 2008 22:38:17 +0200 Subject: Fix warnings about unused variables Signed-off-by: Matt Colyer --- src/AFC.c | 1 - src/ifuse.c | 5 ++--- src/initconf.c | 2 ++ src/lockdown.c | 6 +++--- src/main.c | 3 +-- src/userpref.c | 1 - 6 files changed, 8 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/AFC.c b/src/AFC.c index 6a0df50..055f59f 100644 --- a/src/AFC.c +++ b/src/AFC.c @@ -85,7 +85,6 @@ int count_nullspaces(char *string, int number) { } int dispatch_AFC_packet(AFClient *client, const char *data, int length) { - char *buffer; int bytes = 0, offset = 0; if (!client || !client->connection || !client->afc_packet) return 0; if (!data || !length) length = 0; diff --git a/src/ifuse.c b/src/ifuse.c index 9fc1ad8..aa06070 100644 --- a/src/ifuse.c +++ b/src/ifuse.c @@ -65,7 +65,7 @@ static int ifuse_getattr(const char *path, struct stat *stbuf) { static int ifuse_readdir(const char *path, void *buf, fuse_fill_dir_t filler, off_t offset, struct fuse_file_info *fi) { int i; - char **dirs, **filename; + char **dirs; AFClient *afc = fuse_get_context()->private_data; dirs = afc_get_dir_list(afc, path); @@ -173,8 +173,7 @@ static int ifuse_release(const char *path, struct fuse_file_info *fi){ } void *ifuse_init(struct fuse_conn_info *conn) { - char *response = (char*)malloc(sizeof(char) * 2048); - int bytes = 0, port = 0, i = 0; + int port = 0; char* host_id = NULL; AFClient *afc = NULL; diff --git a/src/initconf.c b/src/initconf.c index 92f8085..be697e8 100644 --- a/src/initconf.c +++ b/src/initconf.c @@ -19,6 +19,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include +#include #include #include #include "userpref.h" diff --git a/src/lockdown.c b/src/lockdown.c index 480a653..78ab6a9 100644 --- a/src/lockdown.c +++ b/src/lockdown.c @@ -356,8 +356,9 @@ int lockdownd_gen_pair_cert(char *public_key_b64, char **device_cert_b64, char * /* first decode base64 public_key */ gnutls_datum_t pem_pub_key; - pem_pub_key.data = g_base64_decode (public_key_b64, &pem_pub_key.size); - + gsize decoded_size; + pem_pub_key.data = g_base64_decode (public_key_b64, &decoded_size); + pem_pub_key.size = decoded_size; /* now decode the PEM encoded key */ gnutls_datum_t der_pub_key; @@ -396,7 +397,6 @@ int lockdownd_gen_pair_cert(char *public_key_b64, char **device_cert_b64, char * if (1 == ret && 0 != modulus.size && 0 != exponent.size) { gnutls_global_init(); - int effthis = 0; gnutls_datum_t essentially_null = {strdup("abababababababab"), strlen("abababababababab")}; gnutls_x509_privkey_t fake_privkey, root_privkey; diff --git a/src/main.c b/src/main.c index 91bb48c..302b886 100644 --- a/src/main.c +++ b/src/main.c @@ -37,11 +37,10 @@ int debug = 1; int main(int argc, char *argv[]) { - char* host_id = NULL; + /* char* host_id = NULL; */ iPhone *phone = get_iPhone(); if (argc > 1 && !strcasecmp(argv[1], "--debug")) debug = 1; else debug = 0; - char *response = (char*)malloc(sizeof(char) * 2048); int bytes = 0, port = 0, i = 0; if (phone) printf("I got a phone.\n"); else { printf("oops\n"); return -1; } diff --git a/src/userpref.c b/src/userpref.c index 1a9ebc9..1dfc6ff 100644 --- a/src/userpref.c +++ b/src/userpref.c @@ -165,7 +165,6 @@ int read_file_in_confdir(char* file, gnutls_datum_t* data) if (g_file_test(filepath, (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))) { FILE * pFile; - long lSize; pFile = fopen ( filepath , "rb" ); if (pFile==NULL) -- cgit v1.1-32-gdbae