]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix a few compilation warnings and errors
authorNick Mathewson <nickm@torproject.org>
Tue, 15 Dec 2015 18:03:21 +0000 (13:03 -0500)
committerNick Mathewson <nickm@torproject.org>
Tue, 15 Dec 2015 18:03:21 +0000 (13:03 -0500)
src/or/connection.h
src/or/directory.c
src/or/directory.h
src/test/test_connection.c

index 7479faa50933a58fc31f7281c2dbec894512102a..59ea6d898e33f385620432e0fb54dd6bcb2799d5 100644 (file)
@@ -216,7 +216,7 @@ smartlist_t *connection_dir_list_by_purpose_resource_and_state(
 
 /** Return a count of directory connections that are fetching the item
  * described by <b>purpose</b>/<b>resource</b>. */
-static INLINE int
+static inline int
 connection_dir_count_by_purpose_and_resource(
                                              int purpose,
                                              const char *resource)
@@ -229,7 +229,7 @@ connection_dir_count_by_purpose_and_resource(
 
 /** Return a count of directory connections that are fetching the item
  * described by <b>purpose</b>/<b>resource</b>/<b>state</b>. */
-static INLINE int
+static inline int
 connection_dir_count_by_purpose_resource_and_state(
                                                    int purpose,
                                                    const char *resource,
index 63bbdafd3fc0e09640b748c9e00aa9c047bcb9a7..8370095e927435dab22404bbdc681f9e74dc9db0 100644 (file)
@@ -3441,7 +3441,7 @@ connection_dir_finished_flushing(dir_connection_t *conn)
 /* A helper function for connection_dir_close_consensus_conn_if_extra()
  * and connection_dir_close_extra_consensus_conns() that returns 0 if
  * we can't have, or don't want to close, excess consensus connections. */
-int
+STATIC int
 connection_dir_would_close_consensus_conn_helper(void)
 {
   const or_options_t *options = get_options();
index 22d7b662129aeb5b720c00accd4a38ddd9b9665d..2644e5703ead7ddccb72112da88306653661b811 100644 (file)
@@ -142,7 +142,7 @@ STATIC int directory_handle_command_get(dir_connection_t *conn,
                                         const char *headers,
                                         const char *req_body,
                                         size_t req_body_len);
-int connection_dir_would_close_consensus_conn_helper(void);
+STATIC int connection_dir_would_close_consensus_conn_helper(void);
 STATIC int download_status_schedule_get_delay(download_status_t *dls,
                                               const smartlist_t *schedule,
                                               time_t now);
index 1067b5fa1f9709ccb02a49766b07b3936c320edc..bbd3452d439d6d5b1ff806310bc9338deaf05a88 100644 (file)
@@ -312,7 +312,7 @@ test_conn_download_status_setup(const struct testcase_t *tc)
   (void)tc;
 
   /* Don't return NULL, that causes the test to fail */
-  return "ok";
+  return (void*)"ok";
 }
 
 static int