Skip to content

Commit

Permalink
less warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
jinmei committed Jul 31, 2003
1 parent 77b6bc8 commit 0d2c990
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 19 deletions.
4 changes: 1 addition & 3 deletions kame/kame/dhcp6/cfparse.y
@@ -1,4 +1,4 @@
/* $KAME: cfparse.y,v 1.23 2003/07/31 21:44:10 jinmei Exp $ */
/* $KAME: cfparse.y,v 1.24 2003/07/31 23:20:25 jinmei Exp $ */

/*
* Copyright (C) 2002 WIDE Project.
Expand Down Expand Up @@ -349,8 +349,6 @@ dhcpoption_list:
}
| dhcpoption COMMA dhcpoption_list
{
struct cf_list *head;

$1->next = $3;
$1->tail = $3->tail;

Expand Down
7 changes: 6 additions & 1 deletion kame/kame/dhcp6/cftoken.l
@@ -1,4 +1,4 @@
/* $KAME: cftoken.l,v 1.21 2003/07/31 21:44:10 jinmei Exp $ */
/* $KAME: cftoken.l,v 1.22 2003/07/31 23:20:25 jinmei Exp $ */

%{
/*
Expand Down Expand Up @@ -50,6 +50,8 @@
#include "common.h"
#include "y.tab.h"

#define YY_NO_UNPUT 1

char *configfilename;
int lineno = 1;

Expand All @@ -64,6 +66,9 @@ int cfdebug = 1;
int cfdebug = 0;
#endif

extern int yyparse __P((void));
extern int cf_post_config __P((void));

static void cfdebug_print __P((char *, char *, int));

#define DP(str) if (cfdebug) cfdebug_print(str, yytext, yyleng)
Expand Down
7 changes: 5 additions & 2 deletions kame/kame/dhcp6/common.c
@@ -1,4 +1,4 @@
/* $KAME: common.c,v 1.88 2003/07/31 22:24:23 jinmei Exp $ */
/* $KAME: common.c,v 1.89 2003/07/31 23:20:25 jinmei Exp $ */
/*
* Copyright (C) 1998 and 1999 WIDE Project.
* All rights reserved.
Expand Down Expand Up @@ -53,6 +53,7 @@

#include <netinet/in.h>
#include <netinet6/in6_var.h>
#include <ctype.h>
#include <errno.h>
#include <limits.h>
#include <stdio.h>
Expand Down Expand Up @@ -159,6 +160,8 @@ dhcp6_clear_listval(lv)
case DHCP6_LISTVAL_VBUF:
dhcp6_vbuf_free(&lv->val_vbuf);
break;
default: /* nothing to do */
break;
}
free(lv);
}
Expand Down Expand Up @@ -1777,7 +1780,7 @@ dnsencode(name, buf, buflen)
{
char *cp, *ep;
const char *p, *q;
int i, nterm = 1;
int i;
int namelen = strlen(name);

cp = buf;
Expand Down
4 changes: 2 additions & 2 deletions kame/kame/dhcp6/dhcp6c.c
@@ -1,4 +1,4 @@
/* $KAME: dhcp6c.c,v 1.120 2003/07/31 22:24:23 jinmei Exp $ */
/* $KAME: dhcp6c.c,v 1.121 2003/07/31 23:20:25 jinmei Exp $ */
/*
* Copyright (C) 1998 and 1999 WIDE Project.
* All rights reserved.
Expand Down Expand Up @@ -27,8 +27,8 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/

#include <sys/types.h>
#include <sys/param.h>
#include <sys/socket.h>
#include <sys/sockio.h>
#include <sys/uio.h>
Expand Down
7 changes: 6 additions & 1 deletion kame/kame/dhcp6/dhcp6c_ia.c
@@ -1,4 +1,4 @@
/* $KAME: dhcp6c_ia.c,v 1.18 2003/07/31 22:24:23 jinmei Exp $ */
/* $KAME: dhcp6c_ia.c,v 1.19 2003/07/31 23:20:25 jinmei Exp $ */

/*
* Copyright (C) 2003 WIDE Project.
Expand Down Expand Up @@ -164,6 +164,9 @@ update_ia(iatype, ialist, ifp, serverid)
goto nextia;
}
break;
default:
dprintf(LOG_ERR, FNAME, "impossible case");
goto nextia;
}
}

Expand Down Expand Up @@ -567,6 +570,8 @@ ia_timo(arg)
}
}
break;
default:
break;
}

ev->timeouts = 0;
Expand Down
3 changes: 2 additions & 1 deletion kame/kame/dhcp6/dhcp6c_script.c
@@ -1,4 +1,4 @@
/* $KAME: dhcp6c_script.c,v 1.5 2003/07/31 21:44:11 jinmei Exp $ */
/* $KAME: dhcp6c_script.c,v 1.6 2003/07/31 23:20:25 jinmei Exp $ */

/*
* Copyright (C) 2003 WIDE Project.
Expand Down Expand Up @@ -51,6 +51,7 @@
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <syslog.h>
#include <errno.h>
Expand Down
11 changes: 4 additions & 7 deletions kame/kame/dhcp6/dhcp6relay.c
@@ -1,4 +1,4 @@
/* $KAME: dhcp6relay.c,v 1.45 2003/07/31 22:24:23 jinmei Exp $ */
/* $KAME: dhcp6relay.c,v 1.46 2003/07/31 23:20:25 jinmei Exp $ */
/*
* Copyright (C) 2000 WIDE Project.
* All rights reserved.
Expand Down Expand Up @@ -70,10 +70,9 @@ static char *boundaddr;
static char *serveraddr = DH6ADDR_ALLSERVER;

static char *rmsgctlbuf;
static socklen_t rmsgctllen, smsgctllen;
static socklen_t rmsgctllen;
static struct msghdr rmh;
static char rdatabuf[BUFSIZ];
static struct in6_pktinfo *spktinfo;
static int relayifid;

static int mhops = DHCP6_RELAY_MULTICAST_HOPS;
Expand Down Expand Up @@ -251,11 +250,9 @@ relay6_init()
{
struct addrinfo hints;
struct addrinfo *res, *res2;
int i, ifid, error;
int i, ifid, error, on;
struct ipv6_mreq mreq6;
int type, on;
static struct iovec iov[2];
struct cmsghdr *cm;

/* initialize non-link-local prefixes list */
TAILQ_INIT(&global_prefixes);
Expand Down Expand Up @@ -452,7 +449,7 @@ static void
relay6_loop()
{
fd_set readfds;
int e, cc;
int e;

while(1) {
/* we'd rather use FD_COPY here, but it's not POSIX friendly */
Expand Down
13 changes: 11 additions & 2 deletions kame/kame/dhcp6/dhcp6s.c
@@ -1,4 +1,4 @@
/* $KAME: dhcp6s.c,v 1.107 2003/07/31 22:41:49 jinmei Exp $ */
/* $KAME: dhcp6s.c,v 1.108 2003/07/31 23:20:25 jinmei Exp $ */
/*
* Copyright (C) 1998 and 1999 WIDE Project.
* All rights reserved.
Expand Down Expand Up @@ -795,8 +795,11 @@ set_statelessinfo(optinfo)
dprintf(LOG_ERR, FNAME, "failed to copy NTP servers");
return (-1);
}

return (0);
}


static int
react_solicit(ifp, dh6, optinfo, from, fromlen, relayinfohead)
struct dhcp6_if *ifp;
Expand Down Expand Up @@ -1522,6 +1525,10 @@ make_binding_ia(msgtype, iapd, retlist, optinfo)
dhcp6_clear_list(&ialist);
return (-1);
}
break;
default:
dprintf(LOG_ERR, FNAME, "unsupported IA type");
return (-1); /* XXX */
}
}

Expand Down Expand Up @@ -1689,7 +1696,6 @@ server6_send(type, ifp, origmsg, optinfo, from, fromlen,
int len, optlen;
int relayed = 0;
struct dhcp6 *dh6;
struct dhcp6_relay *dh6relay;
struct relayinfo *relayinfo;

if (sizeof(struct dhcp6) > sizeof(replybuf)) {
Expand Down Expand Up @@ -1929,6 +1935,9 @@ make_match_ia(spec, conflist, retlist)
match = dhcp6_find_listval(conflist, spec->type,
&spec->uv, MATCHLIST_PREFIXLEN);
break;
default:
dprintf(LOG_ERR, FNAME, "unsupported IA type");
return (0); /* XXX */
}
}

Expand Down

0 comments on commit 0d2c990

Please sign in to comment.