Fix compile errors and warnings.

This commit is contained in:
Guus Sliepen 2003-07-29 10:50:15 +00:00
parent 0e94541331
commit 714fb32d03
12 changed files with 193 additions and 193 deletions

View file

@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id: connection.c,v 1.1.2.42 2003/07/24 12:08:15 guus Exp $
$Id: connection.c,v 1.1.2.43 2003/07/29 10:50:15 guus Exp $
*/
#include "system.h"
@ -122,7 +122,7 @@ void dump_connections(void)
for(node = connection_tree->head; node; node = node->next) {
c = (connection_t *) node->data;
logger(LOG_DEBUG, _(" %s at %s options %lx socket %d status %04x"),
c->name, c->hostname, c->options, c->socket, c->status);
c->name, c->hostname, c->options, c->socket, *(uint32_t *)&c->status);
}
logger(LOG_DEBUG, _("End of connections."));

View file

@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id: edge.c,v 1.1.2.23 2003/07/24 12:08:15 guus Exp $
$Id: edge.c,v 1.1.2.24 2003/07/29 10:50:15 guus Exp $
*/
#include "system.h"
@ -123,7 +123,7 @@ void edge_del(edge_t *e)
avl_delete(edge_weight_tree, e);
}
edge_t *lookup_edge(const node_t *from, const node_t *to)
edge_t *lookup_edge(node_t *from, node_t *to)
{
edge_t v = {
.from = from,

View file

@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id: edge.h,v 1.1.2.15 2003/07/24 12:08:15 guus Exp $
$Id: edge.h,v 1.1.2.16 2003/07/29 10:50:15 guus Exp $
*/
#ifndef __TINC_EDGE_H__
@ -50,7 +50,7 @@ extern avl_tree_t *new_edge_tree(void) __attribute__ ((malloc));
extern void free_edge_tree(avl_tree_t *);
extern void edge_add(edge_t *);
extern void edge_del(edge_t *);
extern edge_t *lookup_edge(const struct node_t *, const struct node_t *);
extern edge_t *lookup_edge(struct node_t *, struct node_t *);
extern void dump_edges(void);
#endif /* __TINC_EDGE_H__ */

View file

@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id: logger.c,v 1.1.2.6 2003/07/28 22:06:09 guus Exp $
$Id: logger.c,v 1.1.2.7 2003/07/29 10:50:15 guus Exp $
*/
#include "system.h"
@ -47,7 +47,7 @@ void openlogger(const char *ident, logmode_t mode) {
logmode = LOGMODE_NULL;
break;
case LOGMODE_SYSLOG:
#ifdef HAVE_SYSLOG
#ifdef HAVE_SYSLOG_H
openlog(logident, LOG_CONS | LOG_PID, LOG_DAEMON);
break;
#endif
@ -72,7 +72,7 @@ void logger(int priority, const char *format, ...) {
fprintf(logfile, "\n");
break;
case LOGMODE_SYSLOG:
#ifdef HAVE_SYSLOG
#ifdef HAVE_SYSLOG_H
#ifdef HAVE_VSYSLOG
vsyslog(priority, format, ap);
#else
@ -97,7 +97,7 @@ void closelogger(void) {
fclose(logfile);
break;
case LOGMODE_SYSLOG:
#ifdef HAVE_SYSLOG
#ifdef HAVE_SYSLOG_H
closelog();
break;
#endif

View file

@ -20,7 +20,7 @@ typedef enum logmode_t {
LOGMODE_SYSLOG
} logmode_t;
#ifndef HAVE_SYSLOG
#ifndef HAVE_SYSLOG_H
enum {
LOG_EMERG,
LOG_ALERT,

View file

@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id: net.c,v 1.35.4.193 2003/07/23 22:17:31 guus Exp $
$Id: net.c,v 1.35.4.194 2003/07/29 10:50:15 guus Exp $
*/
#include "system.h"
@ -206,7 +206,7 @@ static void check_dead_connections(void)
} else {
if(c->status.remove) {
logger(LOG_WARNING, _("Old connection_t for %s (%s) status %04x still lingering, deleting..."),
c->name, c->hostname, c->status);
c->name, c->hostname, *(uint32_t *)&c->status);
connection_del(c);
continue;
}

View file

@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id: node.c,v 1.1.2.24 2003/07/24 12:08:15 guus Exp $
$Id: node.c,v 1.1.2.25 2003/07/29 10:50:15 guus Exp $
*/
#include "system.h"
@ -143,7 +143,7 @@ void node_del(node_t *n)
avl_delete(node_udp_tree, n);
}
node_t *lookup_node(const char *name)
node_t *lookup_node(char *name)
{
node_t n = {
.name = name,
@ -180,7 +180,7 @@ void dump_nodes(void)
logger(LOG_DEBUG, _(" %s at %s cipher %d digest %d maclength %d compression %d options %lx status %04x nexthop %s via %s"),
n->name, n->hostname, n->cipher ? n->cipher->nid : 0,
n->digest ? n->digest->type : 0, n->maclength, n->compression,
n->options, n->status, n->nexthop ? n->nexthop->name : "-",
n->options, *(uint32_t *)&n->status, n->nexthop ? n->nexthop->name : "-",
n->via ? n->via->name : "-");
}

View file

@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id: node.h,v 1.1.2.27 2003/07/24 12:08:15 guus Exp $
$Id: node.h,v 1.1.2.28 2003/07/29 10:50:15 guus Exp $
*/
#ifndef __TINC_NODE_H__
@ -83,7 +83,7 @@ extern node_t *new_node(void) __attribute__ ((malloc));
extern void free_node(node_t *);
extern void node_add(node_t *);
extern void node_del(node_t *);
extern node_t *lookup_node(const char *);
extern node_t *lookup_node(char *);
extern node_t *lookup_node_udp(const sockaddr_t *);
extern void dump_nodes(void);

View file

@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id: protocol.c,v 1.28.4.143 2003/07/24 12:08:15 guus Exp $
$Id: protocol.c,v 1.28.4.144 2003/07/29 10:50:15 guus Exp $
*/
#include "system.h"
@ -207,7 +207,7 @@ void exit_requests(void)
avl_delete_tree(past_request_tree);
}
bool seen_request(const char *request)
bool seen_request(char *request)
{
past_request_t p = {
.request = request,

View file

@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id: protocol.h,v 1.5.4.41 2003/07/24 12:08:16 guus Exp $
$Id: protocol.h,v 1.5.4.42 2003/07/29 10:50:15 guus Exp $
*/
#ifndef __TINC_PROTOCOL_H__
@ -67,7 +67,7 @@ extern bool check_id(const char *);
extern void init_requests(void);
extern void exit_requests(void);
extern bool seen_request(const char *);
extern bool seen_request(char *);
extern void age_past_requests(void);
/* Requests */