Commit 11e8a445 authored by Sebastian Hahn's avatar Sebastian Hahn
Browse files

Fix a couple of harmless clang3.2 warnings

parent 51c2dd8f
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
  o Code simplifications and refactoring:
    - Get rid of a couple of harmless clang warnings, where we compared
      enums to ints. These warnings are newly introduced in clang 3.2.
+1 −1
Original line number Diff line number Diff line
@@ -1458,7 +1458,7 @@ crypto_digest256(char *digest, const char *m, size_t len,
int
crypto_digest_all(digests_t *ds_out, const char *m, size_t len)
{
  digest_algorithm_t i;
  int i;
  tor_assert(ds_out);
  memset(ds_out, 0, sizeof(*ds_out));
  if (crypto_digest(ds_out->d[DIGEST_SHA1], m, len) < 0)
+2 −2
Original line number Diff line number Diff line
@@ -2223,7 +2223,7 @@ networkstatus_add_detached_signatures(networkstatus_t *target,
  {
    digests_t *digests = strmap_get(sigs->digests, flavor);
    int n_matches = 0;
    digest_algorithm_t alg;
    int alg;
    if (!digests) {
      *msg_out = "No digests for given consensus flavor";
      return -1;
@@ -3471,7 +3471,7 @@ dirvote_free_all(void)
const char *
dirvote_get_pending_consensus(consensus_flavor_t flav)
{
  tor_assert(((int)flav) >= 0 && flav < N_CONSENSUS_FLAVORS);
  tor_assert(((int)flav) >= 0 && (int)flav < N_CONSENSUS_FLAVORS);
  return pending_consensuses[flav].body;
}