summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2022-02-26 16:05:28 +0100
committerMartin Schanzenbach <schanzen@gnunet.org>2022-02-26 16:05:28 +0100
commit52f952df6cd1e8347835573733ceff91c6c4f93e (patch)
tree0e701518b072393725f12b9e04a5ea0d1c9dc832
parentb00d7788784a7e58a318e0f484886c2d6dbd1ca9 (diff)
-silence warnings
-rw-r--r--src/gns/gnunet-service-gns_resolver.c3
-rw-r--r--src/gnsrecord/gnsrecord_crypto.c7
-rw-r--r--src/gnsrecord/gnsrecord_misc.c1
-rw-r--r--src/revocation/revocation_api.c2
-rw-r--r--src/zonemaster/gnunet-service-zonemaster-monitor.c3
-rw-r--r--src/zonemaster/gnunet-service-zonemaster.c3
6 files changed, 2 insertions, 17 deletions
diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c
index 67ed48815..59b7d691c 100644
--- a/src/gns/gnunet-service-gns_resolver.c
+++ b/src/gns/gnunet-service-gns_resolver.c
@@ -1335,9 +1335,7 @@ static void
handle_gns_cname_result (struct GNS_ResolverHandle *rh,
const char *cname)
{
- struct AuthorityChain *ac;
int af;
- struct GNUNET_IDENTITY_PublicKey zone;
GNUNET_free (rh->name);
rh->name = GNUNET_strdup (cname);
@@ -1898,7 +1896,6 @@ handle_gns_resolution_result (void *cls,
{
struct GNS_ResolverHandle *rh = cls;
char *cname;
- int af;
char scratch[UINT16_MAX];
size_t scratch_off;
size_t scratch_start;
diff --git a/src/gnsrecord/gnsrecord_crypto.c b/src/gnsrecord/gnsrecord_crypto.c
index 890ddb011..a1870feba 100644
--- a/src/gnsrecord/gnsrecord_crypto.c
+++ b/src/gnsrecord/gnsrecord_crypto.c
@@ -223,7 +223,6 @@ block_create_ecdsa (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key,
unsigned char ctr[GNUNET_CRYPTO_AES_KEY_LENGTH / 2];
unsigned char skey[GNUNET_CRYPTO_AES_KEY_LENGTH];
struct GNUNET_GNSRECORD_Data rdc[GNUNET_NZL (rd_count)];
- uint32_t rd_count_nbo;
struct GNUNET_TIME_Absolute now;
if (payload_len < 0)
@@ -348,7 +347,6 @@ block_create_eddsa (const struct GNUNET_CRYPTO_EddsaPrivateKey *key,
unsigned char nonce[crypto_secretbox_NONCEBYTES];
unsigned char skey[crypto_secretbox_KEYBYTES];
struct GNUNET_GNSRECORD_Data rdc[GNUNET_NZL (rd_count)];
- uint32_t rd_count_nbo;
struct GNUNET_TIME_Absolute now;
if (payload_len < 0)
@@ -438,7 +436,7 @@ GNUNET_GNSRECORD_block_calculate_size (const struct
unsigned int rd_count)
{
struct GNUNET_IDENTITY_PublicKey pkey;
- ssize_t res;
+ ssize_t res = -1;
GNUNET_IDENTITY_key_get_public (key,
&pkey);
@@ -453,7 +451,7 @@ GNUNET_GNSRECORD_block_calculate_size (const struct
default:
GNUNET_assert (0);
}
- return -1;
+ return res;
}
@@ -754,7 +752,6 @@ block_decrypt_eddsa (const struct GNUNET_GNSRECORD_Block *block,
GNUNET_GNSRECORD_RecordCallback proc,
void *proc_cls)
{
- const struct GNUNET_GNSRECORD_EddsaBlock *edblock = &block->eddsa_block;
size_t payload_len = ntohl (block->size) - sizeof (struct
GNUNET_GNSRECORD_Block);
unsigned char nonce[crypto_secretbox_NONCEBYTES];
diff --git a/src/gnsrecord/gnsrecord_misc.c b/src/gnsrecord/gnsrecord_misc.c
index 662c64713..9da5bd920 100644
--- a/src/gnsrecord/gnsrecord_misc.c
+++ b/src/gnsrecord/gnsrecord_misc.c
@@ -403,7 +403,6 @@ GNUNET_GNSRECORD_normalize_record_set (const char *label,
int include_private,
char **emsg)
{
- struct GNUNET_TIME_Absolute expiry_tombstone;
struct GNUNET_TIME_Absolute now;
struct GNUNET_TIME_Absolute minimum_expiration;
int have_zone_delegation = GNUNET_NO;
diff --git a/src/revocation/revocation_api.c b/src/revocation/revocation_api.c
index bc5dae021..9080ab862 100644
--- a/src/revocation/revocation_api.c
+++ b/src/revocation/revocation_api.c
@@ -758,13 +758,11 @@ GNUNET_REVOCATION_proof_get_size (const struct GNUNET_REVOCATION_PowP *pow)
size_t size;
size_t ksize;
const struct GNUNET_IDENTITY_PublicKey *pk;
- const struct GNUNET_IDENTITY_Signature *sig;
size = sizeof (struct GNUNET_REVOCATION_PowP);
pk = (const struct GNUNET_IDENTITY_PublicKey *) &pow[1];
ksize = GNUNET_IDENTITY_key_get_length (pk);
size += ksize;
- sig = (struct GNUNET_IDENTITY_Signature *) ((char*) &pow[1] + ksize);
size += GNUNET_IDENTITY_signature_get_raw_length_by_type (pk->type);
return size;
}
diff --git a/src/zonemaster/gnunet-service-zonemaster-monitor.c b/src/zonemaster/gnunet-service-zonemaster-monitor.c
index 6474228f4..4b72fe538 100644
--- a/src/zonemaster/gnunet-service-zonemaster-monitor.c
+++ b/src/zonemaster/gnunet-service-zonemaster-monitor.c
@@ -136,7 +136,6 @@ static void
shutdown_task (void *cls)
{
struct DhtPutActivity *ma;
- struct TombstoneActivity *ta;
(void) cls;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -283,9 +282,7 @@ handle_monitor_event (void *cls,
const struct GNUNET_GNSRECORD_Data *rd)
{
struct GNUNET_GNSRECORD_Data rd_public[rd_count];
- struct GNUNET_GNSRECORD_Data rd_fresh[rd_count + 1];
unsigned int rd_public_count;
- unsigned int rd_fresh_count;
struct DhtPutActivity *ma;
struct GNUNET_TIME_Absolute expire;
char *emsg;
diff --git a/src/zonemaster/gnunet-service-zonemaster.c b/src/zonemaster/gnunet-service-zonemaster.c
index c5dd3348d..c6b86bf71 100644
--- a/src/zonemaster/gnunet-service-zonemaster.c
+++ b/src/zonemaster/gnunet-service-zonemaster.c
@@ -246,7 +246,6 @@ static void
shutdown_task (void *cls)
{
struct DhtPutActivity *ma;
- struct TombstoneActivity *ta;
(void) cls;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -687,9 +686,7 @@ put_gns_record (void *cls,
const struct GNUNET_GNSRECORD_Data *rd)
{
struct GNUNET_GNSRECORD_Data rd_public[rd_count];
- struct GNUNET_GNSRECORD_Data rd_fresh[rd_count + 1];
unsigned int rd_public_count;
- unsigned int rd_fresh_count = 0;
struct DhtPutActivity *ma;
struct GNUNET_TIME_Absolute expire;
char *emsg;