Warnings removal pass: always include config.h first; add a few

prototypes in the header files.

This also fixes a few lint errors/warnings.
This commit is contained in:
Ivo Timmermans 2000-11-03 22:35:12 +00:00
parent 73aa7fbf7e
commit 5065ea32c3
6 changed files with 24 additions and 15 deletions

View file

@ -19,9 +19,10 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id: conf.c,v 1.9.4.19 2000/10/29 00:24:31 guus Exp $
$Id: conf.c,v 1.9.4.20 2000/11/03 22:35:10 zarq Exp $
*/
#include "config.h"
#include <ctype.h>
#include <errno.h>
@ -30,7 +31,6 @@
#include <stdlib.h>
#include <string.h>
#include <syslog.h>
#include <stdio.h>
#include <xalloc.h>

View file

@ -17,9 +17,12 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id: connlist.c,v 1.1.2.11 2000/10/29 02:07:39 guus Exp $
$Id: connlist.c,v 1.1.2.12 2000/11/03 22:35:10 zarq Exp $
*/
#include "config.h"
#include <stdio.h>
#include <syslog.h>
#include "net.h" /* Don't ask. */

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: connlist.h,v 1.1.2.9 2000/10/29 22:55:14 guus Exp $
$Id: connlist.h,v 1.1.2.10 2000/11/03 22:35:10 zarq Exp $
*/
#ifndef __TINC_CONNLIST_H__
@ -109,5 +109,7 @@ extern void conn_list_del(conn_list_t *);
extern conn_list_t *lookup_id(char *);
extern void dump_conn_list(void);
extern int read_host_config(conn_list_t *);
extern void destroy_conn_list(void);
extern void prune_conn_list(void);
#endif /* __TINC_CONNLIST_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: protocol.c,v 1.28.4.53 2000/10/29 22:55:14 guus Exp $
$Id: protocol.c,v 1.28.4.54 2000/11/03 22:35:11 zarq Exp $
*/
#include "config.h"
@ -174,7 +174,7 @@ cp
int id_h(conn_list_t *cl)
{
conn_list_t *old;
config_t *cfg;
config_t const *cfg;
cp
if(sscanf(cl->buffer, "%*d %as %d %lx %hd", &cl->name, &cl->protocol_version, &cl->options, &cl->port) != 4)
{
@ -803,6 +803,7 @@ int add_host_h(conn_list_t *cl)
{
conn_list_t *old, *new;
conn_list_t *p;
cp
new = new_conn_list();

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.14 2000/10/29 22:55:15 guus Exp $
$Id: protocol.h,v 1.5.4.15 2000/11/03 22:35:12 zarq Exp $
*/
#ifndef __TINC_PROTOCOL_H__
@ -69,5 +69,7 @@ extern int send_ans_key(conn_list_t*, conn_list_t*, char*);
extern int send_tcppacket(conn_list_t *, void *, int);
extern int notify_others(conn_list_t *, conn_list_t *, int (*function)(conn_list_t*, conn_list_t*));
extern int receive_request(conn_list_t *);
extern int check_id(char *);
#endif /* __TINC_PROTOCOL_H__ */

View file

@ -17,21 +17,22 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id: subnet.c,v 1.1.2.8 2000/10/29 00:02:20 guus Exp $
$Id: subnet.c,v 1.1.2.9 2000/11/03 22:35:12 zarq Exp $
*/
#include <syslog.h>
#include <stdio.h>
#include "config.h"
#include <utils.h>
#include <xalloc.h>
#include "subnet.h"
#include "net.h"
#include <stdio.h>
#include <syslog.h>
#include "conf.h"
#include "net.h"
#include "subnet.h"
#include "system.h"
#include <utils.h>
#include <xalloc.h>
/* lists type of subnet */
subnet_t *subnet_list[SUBNET_TYPES] = { NULL };