[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] MSVC build issue: it can't tell that tor_assert(0) aborts.



commit d8de831932cefe2fe7196609b855892ee7188b4b
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Mon May 14 13:07:27 2012 -0400

    MSVC build issue: it can't tell that tor_assert(0) aborts.
---
 src/or/connection.c    |    3 ++-
 src/or/networkstatus.c |    4 +++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/or/connection.c b/src/or/connection.c
index d379533..0c970cc 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -778,7 +778,8 @@ create_unix_sockaddr(const char *listenaddress, char **readable_address,
          "Unix domain sockets not supported, yet we tried to create one.");
   *len_out = 0;
   tor_assert(0);
-};
+  return NULL;
+}
 #endif /* HAVE_SYS_UN_H */
 
 /** Warn that an accept or a connect has failed because we're running up
diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c
index 910b99c..3646ee6 100644
--- a/src/or/networkstatus.c
+++ b/src/or/networkstatus.c
@@ -1463,8 +1463,10 @@ networkstatus_get_latest_consensus_by_flavor(consensus_flavor_t f)
     return current_ns_consensus;
   else if (f == FLAV_MICRODESC)
     return current_md_consensus;
-  else
+  else {
     tor_assert(0);
+    return NULL;
+  }
 }
 
 /** Return the most recent consensus that we have downloaded, or NULL if it is



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits