summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-05-04 10:25:45 -0400
committerNick Mathewson <nickm@torproject.org>2020-05-04 10:25:45 -0400
commit711385c47f93230aad049b2b7952d391a9114f68 (patch)
tree4e1cc8564029c77b7f4e326d5388d79afb451a42
parent42507429ce45495667c3c334679425210a291226 (diff)
parentb1c383e3e65ec539ebe4394652429f1954e3d805 (diff)
downloadtor-711385c47f93230aad049b2b7952d391a9114f68.tar.gz
tor-711385c47f93230aad049b2b7952d391a9114f68.zip
Merge branch 'bug34077_043' into maint-0.4.3
-rw-r--r--changes/bug340773
-rw-r--r--src/feature/dirauth/shared_random_state.c3
-rw-r--r--src/feature/hs/hs_client.c3
3 files changed, 6 insertions, 3 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 1792d540c6..cfbfa4ec5b 100644
--- a/src/feature/dirauth/shared_random_state.c
+++ b/src/feature/dirauth/shared_random_state.c
@@ -1039,8 +1039,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;
}
diff --git a/src/feature/hs/hs_client.c b/src/feature/hs/hs_client.c
index da1202b642..68d6619cea 100644
--- a/src/feature/hs/hs_client.c
+++ b/src/feature/hs/hs_client.c
@@ -1350,7 +1350,7 @@ client_desc_missing_bad_client_auth(const smartlist_t *entry_conns,
/* We should not be called with another type of status. Recover by
* sending a generic error. */
tor_assert_nonfatal_unreached();
- code = HS_DESC_DECODE_GENERIC_ERROR;
+ code = SOCKS5_GENERAL_ERROR;
}
entry_conn->socks_request->socks_extended_error_code = code;
connection_mark_unattached_ap(entry_conn, END_STREAM_REASON_MISC);
@@ -2493,4 +2493,3 @@ set_hs_client_auths_map(digest256map_t *map)
}
#endif /* defined(TOR_UNIT_TESTS) */
-