From ddd5e4cf16dbdb72e463963102ff2597a40ee456 Mon Sep 17 00:00:00 2001 From: Ben Kibbey Date: Sun, 4 Jan 2009 20:44:56 -0500 Subject: [PATCH] Fixed some compile-time warnings. --- src/commands.c | 6 ++++-- src/common.h | 12 ++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/commands.c b/src/commands.c index e691f200..8fbeba42 100644 --- a/src/commands.c +++ b/src/commands.c @@ -921,7 +921,8 @@ gpg_error_t do_xml_encrypt(struct client_s *client, } memcpy(crypto->tkey, crypto->key, gcrykeysize); - crypto->tkey[0] ^= 1; + guchar *tkey = crypto->tkey; + tkey[0] ^= 1; if ((rc = gcry_cipher_setkey(crypto->gh, crypto->tkey, gcrykeysize))) { gcry_free(inbuf); @@ -2930,7 +2931,8 @@ gpg_error_t try_xml_decrypt(assuan_context_t ctx, guchar *key, } memcpy(crypto->tkey, key, gcrykeysize); - crypto->tkey[0] ^= 1; + guchar *tkey = crypto->tkey; + tkey[0] ^= 1; if ((rc = gcry_cipher_setkey(crypto->gh, crypto->tkey, gcrykeysize))) { log_write("%s(%i): %s", __FUNCTION__, __LINE__, gcry_strerror(rc)); diff --git a/src/common.h b/src/common.h index dd37d51d..71426fd9 100644 --- a/src/common.h +++ b/src/common.h @@ -146,12 +146,12 @@ struct client_thread_s { }; struct client_crypto_s { - guchar *iv; - guchar *key; - guchar *tkey; - guchar *tkey2; - guchar *inbuf; - guchar *outbuf; + gpointer iv; + gpointer key; + gpointer tkey; + gpointer tkey2; + gpointer inbuf; + gpointer outbuf; file_header_internal_t *fh; gcry_cipher_hd_t gh; }; -- 2.11.4.GIT