From 080456219a04da01530e506e8f27abb040cd1f9b Mon Sep 17 00:00:00 2001 From: "git@daemon.de" Date: Fri, 14 Mar 2014 19:50:12 +0100 Subject: [PATCH] removed unused vars --- TODO | 14 ++++++++++++-- include/pcp.h | 1 - libpcp/crypto.c | 4 ---- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/TODO b/TODO index c56fcea..04955dc 100644 --- a/TODO +++ b/TODO @@ -25,10 +25,20 @@ Symmetric decrypt mode tries to open vault pcp_find_primary_secret() makes a copy ??? -sym encrypt mac => mac, mac => freebsd and freebsd => mac doesnt work - c++ destructor double free mess +size_t 32bit/64bit: +buffer.c: In function 'buffer_info': +buffer.c:268:3: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'size_t' [-Werror=format] +buffer.c:268:3: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'size_t' [-Werror=format] +buffer.c:269:3: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'size_t' [-Werror=format] +buffer.c:269:3: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'size_t' [-Werror=format] +buffer.c:270:3: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'size_t' [-Werror=format] +buffer.c:270:3: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'size_t' [-Werror=format] +buffer.c:271:3: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'size_t' [-Werror=format] +buffer.c:271:3: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'size_t' [-Werror=format] +http://stackoverflow.com/questions/2426113/i-have-having-following-warning-in-gcc-compilation-in-32-bit-architecture-but-no + Python binding, e.g.: py % cdll.LoadLibrary("libsodium.so.8") diff --git a/include/pcp.h b/include/pcp.h index fb0d6c6..8b16eae 100644 --- a/include/pcp.h +++ b/include/pcp.h @@ -8,7 +8,6 @@ extern "C" { #include "pcp/config.h" #include "pcp/base85.h" #include "pcp/buffer.h" -#include "pcp/config.h" #include "pcp/crypto.h" #include "pcp/defines.h" #include "pcp/digital_crc32.h" diff --git a/libpcp/crypto.c b/libpcp/crypto.c index e8a796e..0e5a329 100644 --- a/libpcp/crypto.c +++ b/libpcp/crypto.c @@ -163,7 +163,6 @@ byte *pcp_box_decrypt(pcp_key_t *secret, pcp_pubkey_t *pub, size_t pcp_decrypt_stream(Pcpstream *in, Pcpstream* out, pcp_key_t *s, byte *symkey, int verify) { pcp_pubkey_t *cur = NULL; - pcp_pubkey_t *sender = NULL; byte *reccipher = NULL; int recmatch, self; uint32_t lenrec; @@ -244,7 +243,6 @@ size_t pcp_decrypt_stream(Pcpstream *in, Pcpstream* out, pcp_key_t *s, byte *sym if(recipient != NULL && rec_size == crypto_secretbox_KEYBYTES) { /* found a match */ recmatch = 1; - sender = cur; symkey = ucmalloc(crypto_secretbox_KEYBYTES); memcpy(symkey, recipient, crypto_secretbox_KEYBYTES); free(recipient); @@ -289,7 +287,6 @@ size_t pcp_encrypt_stream(Pcpstream *in, Pcpstream *out, pcp_key_t *s, pcp_pubke uint32_t lenrec; size_t rec_size, out_size; byte head[1]; - byte rs[1]; /* 6[1]|temp_keypair.pubkey|len(recipients)[4]|(recipients...)|(secretboxes...) @@ -304,7 +301,6 @@ size_t pcp_encrypt_stream(Pcpstream *in, Pcpstream *out, pcp_key_t *s, pcp_pubke /* B, encrypt it asymetrically for each recipient */ recipient_count = HASH_COUNT(p); rec_size = PCP_ASYM_RECIPIENT_SIZE; - rs[0] = PCP_ASYM_RECIPIENT_SIZE - crypto_secretbox_NONCEBYTES; recipients_cipher = ucmalloc(rec_size * recipient_count); nrec = 0;