mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Clean up a few warnings that make gcc twig out a bit.
svn:r5062
This commit is contained in:
+6
-1
@@ -1001,7 +1001,12 @@ tor_mutex_free(tor_mutex_t *m)
|
||||
unsigned long
|
||||
tor_get_thread_id(void)
|
||||
{
|
||||
return (unsigned long)pthread_self();
|
||||
union {
|
||||
pthread_t thr;
|
||||
unsigned long id;
|
||||
} r;
|
||||
r.thr = pthread_self();
|
||||
return r.id;
|
||||
}
|
||||
#else
|
||||
struct tor_mutex_t {
|
||||
|
||||
@@ -461,7 +461,7 @@ circuit_deliver_create_cell(circuit_t *circ, uint8_t cell_type, char *payload)
|
||||
/** We've decided to start our reachability testing. If all
|
||||
* is set, log this to the user. Return 1 if we did, or 0 if
|
||||
* we chose not to log anything. */
|
||||
int
|
||||
static int
|
||||
inform_testing_reachability(void)
|
||||
{
|
||||
char dirbuf[128];
|
||||
|
||||
+1
-1
@@ -3171,7 +3171,7 @@ init_libevent(void)
|
||||
*/
|
||||
suppress_libevent_log_msg("Function not implemented");
|
||||
#ifdef __APPLE__
|
||||
putenv("EVENT_NOKQUEUE=1");
|
||||
setenv("EVENT_NOKQUEUE","1",1);
|
||||
#endif
|
||||
event_init();
|
||||
suppress_libevent_log_msg(NULL);
|
||||
|
||||
+3
-2
@@ -554,7 +554,8 @@ list_server_status(smartlist_t *routers, char **router_status_out)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
/* DOCDOC */
|
||||
static int
|
||||
_compare_tor_version_str_ptr(const void **_a, const void **_b)
|
||||
{
|
||||
const char *a = *_a, *b = *_b;
|
||||
@@ -695,7 +696,7 @@ dirserv_dump_directory_to_string(char **dir_out,
|
||||
static cached_dir_t the_directory = { NULL, NULL, 0, 0, 0 };
|
||||
|
||||
/* Used only by non-auth dirservers: The directory and runningrouters we'll
|
||||
* serve when requested. */
|
||||
* serve when requested. */
|
||||
static cached_dir_t cached_directory = { NULL, NULL, 0, 0, 0 };
|
||||
static cached_dir_t cached_runningrouters = { NULL, NULL, 0, 0, 0 };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user