diff options
| author | 2008-08-10 22:38:17 +0200 | |
|---|---|---|
| committer | 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) { | |||
| 85 | } | 85 | } |
| 86 | 86 | ||
| 87 | int dispatch_AFC_packet(AFClient *client, const char *data, int length) { | 87 | int dispatch_AFC_packet(AFClient *client, const char *data, int length) { |
| 88 | char *buffer; | ||
| 89 | int bytes = 0, offset = 0; | 88 | int bytes = 0, offset = 0; |
| 90 | if (!client || !client->connection || !client->afc_packet) return 0; | 89 | if (!client || !client->connection || !client->afc_packet) return 0; |
| 91 | if (!data || !length) length = 0; | 90 | 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) { | |||
| 65 | static int ifuse_readdir(const char *path, void *buf, fuse_fill_dir_t filler, | 65 | static int ifuse_readdir(const char *path, void *buf, fuse_fill_dir_t filler, |
| 66 | off_t offset, struct fuse_file_info *fi) { | 66 | off_t offset, struct fuse_file_info *fi) { |
| 67 | int i; | 67 | int i; |
| 68 | char **dirs, **filename; | 68 | char **dirs; |
| 69 | AFClient *afc = fuse_get_context()->private_data; | 69 | AFClient *afc = fuse_get_context()->private_data; |
| 70 | 70 | ||
| 71 | dirs = afc_get_dir_list(afc, path); | 71 | dirs = afc_get_dir_list(afc, path); |
| @@ -173,8 +173,7 @@ static int ifuse_release(const char *path, struct fuse_file_info *fi){ | |||
| 173 | } | 173 | } |
| 174 | 174 | ||
| 175 | void *ifuse_init(struct fuse_conn_info *conn) { | 175 | void *ifuse_init(struct fuse_conn_info *conn) { |
| 176 | char *response = (char*)malloc(sizeof(char) * 2048); | 176 | int port = 0; |
| 177 | int bytes = 0, port = 0, i = 0; | ||
| 178 | char* host_id = NULL; | 177 | char* host_id = NULL; |
| 179 | AFClient *afc = NULL; | 178 | AFClient *afc = NULL; |
| 180 | 179 | ||
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 @@ | |||
| 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 20 | */ | 20 | */ |
| 21 | 21 | ||
| 22 | #include <stdio.h> | ||
| 23 | #include <stdlib.h> | ||
| 22 | #include <gnutls/gnutls.h> | 24 | #include <gnutls/gnutls.h> |
| 23 | #include <glib.h> | 25 | #include <glib.h> |
| 24 | #include "userpref.h" | 26 | #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 * | |||
| 356 | 356 | ||
| 357 | /* first decode base64 public_key */ | 357 | /* first decode base64 public_key */ |
| 358 | gnutls_datum_t pem_pub_key; | 358 | gnutls_datum_t pem_pub_key; |
| 359 | pem_pub_key.data = g_base64_decode (public_key_b64, &pem_pub_key.size); | 359 | gsize decoded_size; |
| 360 | 360 | pem_pub_key.data = g_base64_decode (public_key_b64, &decoded_size); | |
| 361 | pem_pub_key.size = decoded_size; | ||
| 361 | 362 | ||
| 362 | /* now decode the PEM encoded key */ | 363 | /* now decode the PEM encoded key */ |
| 363 | gnutls_datum_t der_pub_key; | 364 | gnutls_datum_t der_pub_key; |
| @@ -396,7 +397,6 @@ int lockdownd_gen_pair_cert(char *public_key_b64, char **device_cert_b64, char * | |||
| 396 | if (1 == ret && 0 != modulus.size && 0 != exponent.size) { | 397 | if (1 == ret && 0 != modulus.size && 0 != exponent.size) { |
| 397 | 398 | ||
| 398 | gnutls_global_init(); | 399 | gnutls_global_init(); |
| 399 | int effthis = 0; | ||
| 400 | gnutls_datum_t essentially_null = {strdup("abababababababab"), strlen("abababababababab")}; | 400 | gnutls_datum_t essentially_null = {strdup("abababababababab"), strlen("abababababababab")}; |
| 401 | 401 | ||
| 402 | gnutls_x509_privkey_t fake_privkey, root_privkey; | 402 | gnutls_x509_privkey_t fake_privkey, root_privkey; |
| @@ -37,11 +37,10 @@ | |||
| 37 | int debug = 1; | 37 | int debug = 1; |
| 38 | 38 | ||
| 39 | int main(int argc, char *argv[]) { | 39 | int main(int argc, char *argv[]) { |
| 40 | char* host_id = NULL; | 40 | /* char* host_id = NULL; */ |
| 41 | iPhone *phone = get_iPhone(); | 41 | iPhone *phone = get_iPhone(); |
| 42 | if (argc > 1 && !strcasecmp(argv[1], "--debug")) debug = 1; | 42 | if (argc > 1 && !strcasecmp(argv[1], "--debug")) debug = 1; |
| 43 | else debug = 0; | 43 | else debug = 0; |
| 44 | char *response = (char*)malloc(sizeof(char) * 2048); | ||
| 45 | int bytes = 0, port = 0, i = 0; | 44 | int bytes = 0, port = 0, i = 0; |
| 46 | if (phone) printf("I got a phone.\n"); | 45 | if (phone) printf("I got a phone.\n"); |
| 47 | else { printf("oops\n"); return -1; } | 46 | 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) | |||
| 165 | if (g_file_test(filepath, (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))) { | 165 | if (g_file_test(filepath, (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))) { |
| 166 | 166 | ||
| 167 | FILE * pFile; | 167 | FILE * pFile; |
| 168 | long lSize; | ||
| 169 | 168 | ||
| 170 | pFile = fopen ( filepath , "rb" ); | 169 | pFile = fopen ( filepath , "rb" ); |
| 171 | if (pFile==NULL) | 170 | if (pFile==NULL) |
