summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-04-30 22:59:08 -0400
committerNick Mathewson <nickm@torproject.org>2020-04-30 22:59:08 -0400
commitb4b1882da012697136d3ffd40f693b1f97964a5b (patch)
tree9c4fa509539c055acf45e205be43e15b3291e17b
parent2d34d4d1af5395885780ee96fbedb0bf17fb0f44 (diff)
parentd7e166bd95411d3f5caa573e0293356bff78c481 (diff)
downloadtor-b4b1882da012697136d3ffd40f693b1f97964a5b.tar.gz
tor-b4b1882da012697136d3ffd40f693b1f97964a5b.zip
Merge branch 'bug34077_041' into bug34077_042
-rw-r--r--changes/bug340773
-rw-r--r--src/feature/dirauth/shared_random_state.c3
2 files changed, 5 insertions, 1 deletions
diff --git a/changes/bug34077 b/changes/bug34077
new file mode 100644
index 0000000000..29458bd9de
--- /dev/null
+++ b/changes/bug34077
@@ -0,0 +1,3 @@
+ o Minor bugfixes (compiler warnings):
+ - Fix compilation warnings with GCC 10.0.1. Fixes bug 34077; bugfix on
+ 0.4.0.3-alpha.
diff --git a/src/feature/dirauth/shared_random_state.c b/src/feature/dirauth/shared_random_state.c
index 76befb0f5f..4078d6a24a 100644
--- a/src/feature/dirauth/shared_random_state.c
+++ b/src/feature/dirauth/shared_random_state.c
@@ -1066,8 +1066,9 @@ sr_state_set_valid_after(time_t valid_after)
sr_phase_t
sr_state_get_phase(void)
{
- void *ptr;
+ void *ptr=NULL;
state_query(SR_STATE_ACTION_GET, SR_STATE_OBJ_PHASE, NULL, &ptr);
+ tor_assert(ptr);
return *(sr_phase_t *) ptr;
}