Commit 2f2b8d7e authored by Christophe Fergeau's avatar Christophe Fergeau Committed by Matt Colyer

Fix warnings about unused variables

Signed-off-by: 's avatarMatt Colyer <matt@colyer.name>
parent 020d7c23
...@@ -85,7 +85,6 @@ int count_nullspaces(char *string, int number) { ...@@ -85,7 +85,6 @@ int count_nullspaces(char *string, int number) {
} }
int dispatch_AFC_packet(AFClient *client, const char *data, int length) { int dispatch_AFC_packet(AFClient *client, const char *data, int length) {
char *buffer;
int bytes = 0, offset = 0; int bytes = 0, offset = 0;
if (!client || !client->connection || !client->afc_packet) return 0; if (!client || !client->connection || !client->afc_packet) return 0;
if (!data || !length) length = 0; if (!data || !length) length = 0;
......
...@@ -65,7 +65,7 @@ static int ifuse_getattr(const char *path, struct stat *stbuf) { ...@@ -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, static int ifuse_readdir(const char *path, void *buf, fuse_fill_dir_t filler,
off_t offset, struct fuse_file_info *fi) { off_t offset, struct fuse_file_info *fi) {
int i; int i;
char **dirs, **filename; char **dirs;
AFClient *afc = fuse_get_context()->private_data; AFClient *afc = fuse_get_context()->private_data;
dirs = afc_get_dir_list(afc, path); dirs = afc_get_dir_list(afc, path);
...@@ -173,8 +173,7 @@ static int ifuse_release(const char *path, struct fuse_file_info *fi){ ...@@ -173,8 +173,7 @@ static int ifuse_release(const char *path, struct fuse_file_info *fi){
} }
void *ifuse_init(struct fuse_conn_info *conn) { void *ifuse_init(struct fuse_conn_info *conn) {
char *response = (char*)malloc(sizeof(char) * 2048); int port = 0;
int bytes = 0, port = 0, i = 0;
char* host_id = NULL; char* host_id = NULL;
AFClient *afc = NULL; AFClient *afc = NULL;
......
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#include <stdio.h>
#include <stdlib.h>
#include <gnutls/gnutls.h> #include <gnutls/gnutls.h>
#include <glib.h> #include <glib.h>
#include "userpref.h" #include "userpref.h"
......
...@@ -356,8 +356,9 @@ int lockdownd_gen_pair_cert(char *public_key_b64, char **device_cert_b64, char * ...@@ -356,8 +356,9 @@ int lockdownd_gen_pair_cert(char *public_key_b64, char **device_cert_b64, char *
/* first decode base64 public_key */ /* first decode base64 public_key */
gnutls_datum_t pem_pub_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 */ /* now decode the PEM encoded key */
gnutls_datum_t der_pub_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 * ...@@ -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) { if (1 == ret && 0 != modulus.size && 0 != exponent.size) {
gnutls_global_init(); gnutls_global_init();
int effthis = 0;
gnutls_datum_t essentially_null = {strdup("abababababababab"), strlen("abababababababab")}; gnutls_datum_t essentially_null = {strdup("abababababababab"), strlen("abababababababab")};
gnutls_x509_privkey_t fake_privkey, root_privkey; gnutls_x509_privkey_t fake_privkey, root_privkey;
......
...@@ -37,11 +37,10 @@ ...@@ -37,11 +37,10 @@
int debug = 1; int debug = 1;
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
char* host_id = NULL; /* char* host_id = NULL; */
iPhone *phone = get_iPhone(); iPhone *phone = get_iPhone();
if (argc > 1 && !strcasecmp(argv[1], "--debug")) debug = 1; if (argc > 1 && !strcasecmp(argv[1], "--debug")) debug = 1;
else debug = 0; else debug = 0;
char *response = (char*)malloc(sizeof(char) * 2048);
int bytes = 0, port = 0, i = 0; int bytes = 0, port = 0, i = 0;
if (phone) printf("I got a phone.\n"); if (phone) printf("I got a phone.\n");
else { printf("oops\n"); return -1; } else { printf("oops\n"); return -1; }
......
...@@ -165,7 +165,6 @@ int read_file_in_confdir(char* file, gnutls_datum_t* data) ...@@ -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))) { if (g_file_test(filepath, (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))) {
FILE * pFile; FILE * pFile;
long lSize;
pFile = fopen ( filepath , "rb" ); pFile = fopen ( filepath , "rb" );
if (pFile==NULL) if (pFile==NULL)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment