[tor-commits] [tor/master] Fix a few compilation warnings and errors
nickm at torproject.org
nickm at torproject.org
Tue Dec 15 18:03:29 UTC 2015
commit 744958e0ddc74e7f4db12a5d078d1188bf9f48e1
Author: Nick Mathewson <nickm at torproject.org>
Date: Tue Dec 15 13:03:21 2015 -0500
Fix a few compilation warnings and errors
---
src/or/connection.h | 4 ++--
src/or/directory.c | 2 +-
src/or/directory.h | 2 +-
src/test/test_connection.c | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/or/connection.h b/src/or/connection.h
index 7479faa..59ea6d8 100644
--- a/src/or/connection.h
+++ b/src/or/connection.h
@@ -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,
diff --git a/src/or/directory.c b/src/or/directory.c
index 63bbdaf..8370095 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -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();
diff --git a/src/or/directory.h b/src/or/directory.h
index 22d7b66..2644e57 100644
--- a/src/or/directory.h
+++ b/src/or/directory.h
@@ -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);
diff --git a/src/test/test_connection.c b/src/test/test_connection.c
index 1067b5f..bbd3452 100644
--- a/src/test/test_connection.c
+++ b/src/test/test_connection.c
@@ -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
More information about the tor-commits
mailing list