]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
MSVC build issue: make 'const' in declaration match 'const' in definition
authorNick Mathewson <nickm@torproject.org>
Mon, 14 May 2012 17:05:00 +0000 (13:05 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 14 May 2012 17:05:36 +0000 (13:05 -0400)
MSVC warns if you declare a function as having a "int foo" argument
and then implement it with a "const int foo" argument, even though
the latter "const" is not a part of the function's interface.

src/or/connection_edge.h
src/or/rephist.h

index 47c9c45b1aadf08dd7442621cf75dfd5f3263bcb..f6db4b4ef96cbb7169618e69aeed1903172120e1 100644 (file)
@@ -79,7 +79,8 @@ int addressmap_have_mapping(const char *address, int update_timeout);
 
 void addressmap_register(const char *address, char *new_address,
                          time_t expires, addressmap_entry_source_t source,
-                         int address_wildcard, int new_address_wildcard);
+                         const int address_wildcard,
+                         const int new_address_wildcard);
 int parse_virtual_addr_network(const char *val, int validate_only,
                                char **msg);
 int client_dns_incr_failures(const char *address);
index 0a3e46ae1a58deb7b24711a454f5e9efab523b30..6b05fe92d68093867423041c2f8fd080948ce936 100644 (file)
@@ -34,7 +34,7 @@ int rep_hist_load_state(or_state_t *state, char **err);
 void rep_history_clean(time_t before);
 
 void rep_hist_note_router_reachable(const char *id, const tor_addr_t *at_addr,
-                                    uint16_t at_port, time_t when);
+                                    const uint16_t at_port, time_t when);
 void rep_hist_note_router_unreachable(const char *id, time_t when);
 int rep_hist_record_mtbf_data(time_t now, int missing_means_down);
 int rep_hist_load_mtbf_data(time_t now);