Coverity deadcode warnings in HSv2-related code
Looks like there's some new dead code now that HSv2 has gone the way of Flash?
Of possible interest for @dgoulet or @asn
________________________________________________________________________________________________________
*** CID 1473233: Possible Control flow issues (DEADCODE)
/src/feature/control/control_cmd.c: 1479 in handle_control_hsfetch()
1473 tor_assert_nonfatal_unreached();
1474 }
1475 }
1476
1477 /* Using a descriptor ID, we force the user to provide at least one
1478 * hsdir server using the SERVER= option. */
>>> CID 1473233: Possible Control flow issues (DEADCODE)
>>> Execution cannot reach the expression "hsdirs" inside this statement: "if (desc_id && (!hsdirs || ...".
1479 if (desc_id && (!hsdirs || !smartlist_len(hsdirs))) {
1480 control_write_endreply(conn, 512, "SERVER option is required");
1481 goto done;
1482 }
1483
1484 /* We are about to trigger HSDir fetch so send the OK now because after
** CID 1473232: Control flow issues (DEADCODE)
/src/core/or/connection_edge.c: 2020 in connection_ap_handle_onion()
________________________________________________________________________________________________________
*** CID 1473232: Control flow issues (DEADCODE)
/src/core/or/connection_edge.c: 2020 in connection_ap_handle_onion()
2014
2015 /* Lookup the given onion address. If invalid, stop right now.
2016 * Otherwise, we might have it in the cache or not. */
2017 unsigned int refetch_desc = 0;
2018 if (rend_cache_lookup_result < 0) {
2019 switch (-rend_cache_lookup_result) {
>>> CID 1473232: Control flow issues (DEADCODE)
>>> Execution cannot reach this statement: "case 22:".
2020 case EINVAL:
2021 /* We should already have rejected this address! */
2022 log_warn(LD_BUG,"Invalid service name '%s'",
2023 safe_str_client(onion_address));
2024 connection_mark_unattached_ap(conn, END_STREAM_REASON_TORPROTOCOL);
2025 return -1;