mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
r14639@catbus: nickm | 2007-08-17 17:45:28 -0400
Compile without warnings on MinGW, even with --enable-gcc-warnings enabled. svn:r11157
This commit is contained in:
parent
f8b3927e07
commit
1f244d3943
@ -1671,7 +1671,7 @@ tor_cond_new(void)
|
|||||||
}
|
}
|
||||||
/** Release all resources held by <b>cond</b>. */
|
/** Release all resources held by <b>cond</b>. */
|
||||||
void
|
void
|
||||||
tor_conf_free(tor_cond_t *cond)
|
tor_cond_free(tor_cond_t *cond)
|
||||||
{
|
{
|
||||||
tor_assert(cond);
|
tor_assert(cond);
|
||||||
if (pthread_cond_destroy(&cond->cond)) {
|
if (pthread_cond_destroy(&cond->cond)) {
|
||||||
|
@ -301,8 +301,8 @@ typedef uint16_t sa_family_t;
|
|||||||
#ifndef _MSC_VER
|
#ifndef _MSC_VER
|
||||||
/* Apparently, MSVC doesn't define s6_addr16 or s6_addr32. How dumb. */
|
/* Apparently, MSVC doesn't define s6_addr16 or s6_addr32. How dumb. */
|
||||||
/* XXXX020 detect with autoconf. */
|
/* XXXX020 detect with autoconf. */
|
||||||
#define S6_ADDR16(x) ((x).s6_addr16)
|
#define S6_ADDR16(x) ((uint16_t*)(x).s6_addr16)
|
||||||
#define S6_ADDR32(x) ((x).s6_addr32)
|
#define S6_ADDR32(x) ((uint32_t*)(x).s6_addr32)
|
||||||
#else
|
#else
|
||||||
#define S6_ADDR16(x) ((uint16_t*)((char*)&(x).s6_addr))
|
#define S6_ADDR16(x) ((uint16_t*)((char*)&(x).s6_addr))
|
||||||
#define S6_ADDR32(x) ((uint32_t*)((char*)&(x).s6_addr))
|
#define S6_ADDR32(x) ((uint32_t*)((char*)&(x).s6_addr))
|
||||||
@ -481,7 +481,7 @@ unsigned long tor_get_thread_id(void);
|
|||||||
#ifdef TOR_IS_MULTITHREADED
|
#ifdef TOR_IS_MULTITHREADED
|
||||||
typedef struct tor_cond_t tor_cond_t;
|
typedef struct tor_cond_t tor_cond_t;
|
||||||
tor_cond_t *tor_cond_new(void);
|
tor_cond_t *tor_cond_new(void);
|
||||||
void tor_conf_free(tor_cond_t *cond);
|
void tor_cond_free(tor_cond_t *cond);
|
||||||
int tor_cond_wait(tor_cond_t *cond, tor_mutex_t *mutex);
|
int tor_cond_wait(tor_cond_t *cond, tor_mutex_t *mutex);
|
||||||
void tor_cond_signal_one(tor_cond_t *cond);
|
void tor_cond_signal_one(tor_cond_t *cond);
|
||||||
void tor_cond_signal_all(tor_cond_t *cond);
|
void tor_cond_signal_all(tor_cond_t *cond);
|
||||||
|
@ -705,6 +705,8 @@ create_unix_sockaddr(const char *listenaddress, char **readable_address)
|
|||||||
static struct sockaddr *
|
static struct sockaddr *
|
||||||
create_unix_sockaddr(const char *listenaddress, char **readable_address)
|
create_unix_sockaddr(const char *listenaddress, char **readable_address)
|
||||||
{
|
{
|
||||||
|
(void)listenaddress;
|
||||||
|
(void)readable_address;
|
||||||
log_fn(LOG_ERR, LD_BUG,
|
log_fn(LOG_ERR, LD_BUG,
|
||||||
"Unix domain sockets not supported, yet we tried to create one.");
|
"Unix domain sockets not supported, yet we tried to create one.");
|
||||||
assert(0);
|
assert(0);
|
||||||
|
@ -122,9 +122,7 @@ typedef int socklen_t;
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* XXXX020 These are for debugging possible memory leaks. */
|
/*XXXX020 for debugging possible memory leaks. */
|
||||||
#include "util.h"
|
|
||||||
#include "compat.h"
|
|
||||||
#define malloc(x) tor_malloc(x)
|
#define malloc(x) tor_malloc(x)
|
||||||
#define realloc(x,y) tor_realloc((x),(y))
|
#define realloc(x,y) tor_realloc((x),(y))
|
||||||
#define free(x) tor_free(x)
|
#define free(x) tor_free(x)
|
||||||
|
@ -17,3 +17,7 @@ typedef unsigned char u_char;
|
|||||||
#define WIN32
|
#define WIN32
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* XXXX020 These are for debugging possible memory leaks. */
|
||||||
|
#include "util.h"
|
||||||
|
#include "compat.h"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user