[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated (d9b472753 -> 0950b1df7)
From: |
gnunet |
Subject: |
[gnunet] branch master updated (d9b472753 -> 0950b1df7) |
Date: |
Mon, 16 Nov 2020 23:03:57 +0100 |
This is an automated email from the git hooks/post-receive script.
julius-buenger pushed a change to branch master
in repository gnunet.
from d9b472753 Merge branch 'master' of git+ssh://gnunet.org/gnunet
new 0108f132a rps: get rid of warnings about harmless uninitialized
variables
new 607211bb7 rps: use correct types in format strings
new 89ea76819 rps: use correct buffer sizes
new 266823196 rps: use proper signedness
new 0950b1df7 rps: properly initialise memory
The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
src/rps/gnunet-rps-profiler.c | 3 ++-
src/rps/gnunet-service-rps.c | 2 ++
src/rps/rps-sampler_client.c | 3 ++-
src/rps/rps-test_util.c | 6 +++---
src/rps/rps-test_util.h | 5 ++---
src/rps/test_service_rps_custommap.c | 2 +-
6 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/src/rps/gnunet-rps-profiler.c b/src/rps/gnunet-rps-profiler.c
index 392a3c18f..7d6bf407f 100644
--- a/src/rps/gnunet-rps-profiler.c
+++ b/src/rps/gnunet-rps-profiler.c
@@ -2652,10 +2652,11 @@ pre_profiler (struct RPSPeer *rps_peer, struct
GNUNET_RPS_Handle *h)
store_prefix_file_name (rps_peer->index, "probs");
rps_peer->file_name_probs_hist =
store_prefix_file_name (rps_peer->index, "probs_hist");
+ rps_peer->eval_probs_cache = GNUNET_new_array (num_peers, double);
+ memset (rps_peer->eval_probs_cache, 0, num_peers * sizeof (double));
GNUNET_RPS_view_request (h, 0, view_update_cb, rps_peer);
}
-
void
write_final_stats (void)
{
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c
index ecbc8e208..0e3759c4c 100644
--- a/src/rps/gnunet-service-rps.c
+++ b/src/rps/gnunet-service-rps.c
@@ -596,8 +596,10 @@ static const uint32_t num_valid_peers_max = UINT32_MAX;
static void
do_round (void *cls);
+#if ENABLE_MALICIOUS
static void
do_mal_round (void *cls);
+#endif /* ENABLE_MALICIOUS */
/**
diff --git a/src/rps/rps-sampler_client.c b/src/rps/rps-sampler_client.c
index 5ab854e01..714943b51 100644
--- a/src/rps/rps-sampler_client.c
+++ b/src/rps/rps-sampler_client.c
@@ -379,7 +379,8 @@ sampler_mod_get_rand_peer (void *cls)
return;
}
/* compute probability */
- /* Currently disabled due to numerical limitations */
+ /* FIXME: Currently disabled due to numerical limitations */
+ prob_observed_n = 0; // Inititialise to some value
// prob_observed_n = prob_observed_n_peers (sampler->num_peers_estim,
// s_elem->num_peers,
// sampler->deficiency_factor);
diff --git a/src/rps/rps-test_util.c b/src/rps/rps-test_util.c
index d2cdd3aa7..b73be3457 100644
--- a/src/rps/rps-test_util.c
+++ b/src/rps/rps-test_util.c
@@ -186,7 +186,7 @@ to_file_raw (const char *file_name, const char *buf, size_t
size_buf)
if (size_buf != size_written)
{
LOG (GNUNET_ERROR_TYPE_WARNING,
- "Unable to write to file! (Size: %u, size_written: %u)\n",
+ "Unable to write to file! (Size: %zu, size_written: %zu)\n",
size_buf,
size_written);
@@ -197,7 +197,7 @@ to_file_raw (const char *file_name, const char *buf, size_t
size_buf)
return;
}
LOG (GNUNET_ERROR_TYPE_WARNING,
- "Wrote %u bytes raw.\n",
+ "Wrote %zu bytes raw.\n",
size_written);
if (GNUNET_YES != GNUNET_DISK_file_close (f))
LOG (GNUNET_ERROR_TYPE_WARNING,
@@ -238,7 +238,7 @@ to_file_raw_unaligned (const char *file_name,
"num_bits_buf_unaligned: %u\n",
num_bits_buf_unaligned);
LOG (GNUNET_ERROR_TYPE_DEBUG,
- "ua args: size_buf: %u, bits_needed: %u -> iter: %u\n",
+ "ua args: size_buf: %zu, bits_needed: %u -> iter: %u\n",
size_buf,
bits_needed,
bytes_iter);
diff --git a/src/rps/rps-test_util.h b/src/rps/rps-test_util.h
index 2f11f0105..72aa78803 100644
--- a/src/rps/rps-test_util.h
+++ b/src/rps/rps-test_util.h
@@ -73,7 +73,7 @@ close_all_files ();
"Failed to create tmp_buf\n"); \
break; \
} \
- (void) strncat (tmp_buf, "\n", 512); \
+ (void) strncat (tmp_buf, "\n", 511); \
GNUNET_DISK_file_write (get_file_handle (file_name), \
tmp_buf, \
strnlen (tmp_buf, 512)); \
@@ -94,8 +94,7 @@ close_all_files ();
"Failed to create
tmp_buf\n"); \
break; \
} \
- (void) strncat (tmp_buf, "\n",
\
- len); \
+ (void) strncat (tmp_buf, "\n",
2); \
GNUNET_DISK_file_write ( \
get_file_handle (file_name),
\
tmp_buf, \
diff --git a/src/rps/test_service_rps_custommap.c
b/src/rps/test_service_rps_custommap.c
index 05590b097..3d885ca6b 100644
--- a/src/rps/test_service_rps_custommap.c
+++ b/src/rps/test_service_rps_custommap.c
@@ -35,7 +35,7 @@ check ()
struct CustomPeerMap *c_m;
struct GNUNET_PeerIdentity k1;
struct GNUNET_PeerIdentity k2;
- int j;
+ unsigned int j;
CHECK (NULL != (c_m = CustomPeerMap_create (4)));
memset (&k1, 0, sizeof(k1));
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnunet] branch master updated (d9b472753 -> 0950b1df7),
gnunet <=
- [gnunet] 04/05: rps: use proper signedness, gnunet, 2020/11/16
- [gnunet] 02/05: rps: use correct types in format strings, gnunet, 2020/11/16
- [gnunet] 01/05: rps: get rid of warnings about harmless uninitialized variables, gnunet, 2020/11/16
- [gnunet] 03/05: rps: use correct buffer sizes, gnunet, 2020/11/16
- [gnunet] 05/05: rps: properly initialise memory, gnunet, 2020/11/16