diff options
author | Christophe Fergeau | 2008-08-10 22:38:17 +0200 |
---|---|---|
committer | Matt Colyer | 2008-08-11 09:32:59 -0700 |
commit | 2f2b8d7ea552cbdb5a2cf17ceba364681350f3bb (patch) | |
tree | 3d02c48c43bd1fce5759aa06daac22a12e1db761 /src | |
parent | 020d7c23b17956098379140f1f0047ae8e78df1b (diff) | |
download | libimobiledevice-2f2b8d7ea552cbdb5a2cf17ceba364681350f3bb.tar.gz libimobiledevice-2f2b8d7ea552cbdb5a2cf17ceba364681350f3bb.tar.bz2 |
Fix warnings about unused variables
Signed-off-by: Matt Colyer <matt@colyer.name>
Diffstat (limited to 'src')
-rw-r--r-- | src/AFC.c | 1 | ||||
-rw-r--r-- | src/ifuse.c | 5 | ||||
-rw-r--r-- | src/initconf.c | 2 | ||||
-rw-r--r-- | src/lockdown.c | 6 | ||||
-rw-r--r-- | src/main.c | 3 | ||||
-rw-r--r-- | src/userpref.c | 1 |
6 files changed, 8 insertions, 10 deletions
@@ -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 <stdio.h> +#include <stdlib.h> #include <gnutls/gnutls.h> #include <glib.h> #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; @@ -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) |