Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/dhcp/dist minimal patches to compile with WARNS...



details:   https://anonhg.NetBSD.org/src/rev/fe169161756f
branches:  trunk
changeset: 785662:fe169161756f
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Mar 24 15:53:58 2013 +0000

description:
minimal patches to compile with WARNS=1 !?!?

diffstat:

 external/bsd/dhcp/dist/client/dhc6.c           |   4 +-
 external/bsd/dhcp/dist/client/dhclient.c       |   6 ++--
 external/bsd/dhcp/dist/common/conflex.c        |   6 ++--
 external/bsd/dhcp/dist/common/discover.c       |  14 ++++++------
 external/bsd/dhcp/dist/common/dispatch.c       |   4 +-
 external/bsd/dhcp/dist/common/dns.c            |   6 ++--
 external/bsd/dhcp/dist/common/ns_name.c        |  14 +++++++++---
 external/bsd/dhcp/dist/dst/base64.c            |   9 +++----
 external/bsd/dhcp/dist/includes/dhcpd.h        |   6 ++--
 external/bsd/dhcp/dist/omapip/dispatch.c       |   6 ++--
 external/bsd/dhcp/dist/relay/dhcrelay.c        |   6 ++--
 external/bsd/dhcp/dist/server/ddns.c           |  28 +++++++++++++------------
 external/bsd/dhcp/dist/server/dhcpleasequery.c |   4 +-
 external/bsd/dhcp/dist/server/dhcpv6.c         |  26 ++++++++++++++++-------
 external/bsd/dhcp/dist/server/mdb6.c           |   4 +-
 15 files changed, 80 insertions(+), 63 deletions(-)

diffs (truncated from 611 to 300 lines):

diff -r 42db9dfda14e -r fe169161756f external/bsd/dhcp/dist/client/dhc6.c
--- a/external/bsd/dhcp/dist/client/dhc6.c      Sun Mar 24 15:45:44 2013 +0000
+++ b/external/bsd/dhcp/dist/client/dhc6.c      Sun Mar 24 15:53:58 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dhc6.c,v 1.1.1.1 2013/03/24 15:45:59 christos Exp $    */
+/*     $NetBSD: dhc6.c,v 1.2 2013/03/24 15:53:58 christos Exp $        */
 
 /* dhc6.c - DHCPv6 client routines. */
 
@@ -4790,7 +4790,7 @@
        }
 }
 
-void
+static void
 refresh_info_request6(void *input)
 {
        struct client_state *client;
diff -r 42db9dfda14e -r fe169161756f external/bsd/dhcp/dist/client/dhclient.c
--- a/external/bsd/dhcp/dist/client/dhclient.c  Sun Mar 24 15:45:44 2013 +0000
+++ b/external/bsd/dhcp/dist/client/dhclient.c  Sun Mar 24 15:53:58 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dhclient.c,v 1.1.1.1 2013/03/24 15:45:58 christos Exp $        */
+/*     $NetBSD: dhclient.c,v 1.2 2013/03/24 15:53:58 christos Exp $    */
 
 /* dhclient.c
 
@@ -3696,7 +3696,7 @@
  */
 
 /* The first and second stages are pretty similar so we combine them */
-void
+static void
 client_dns_remove_action(dhcp_ddns_cb_t *ddns_cb,
                         isc_result_t    eresult)
 {
@@ -3863,7 +3863,7 @@
  */
 
 /* The first and second stages are pretty similar so we combine them */
-void
+static void
 client_dns_update_action(dhcp_ddns_cb_t *ddns_cb,
                         isc_result_t    eresult)
 {
diff -r 42db9dfda14e -r fe169161756f external/bsd/dhcp/dist/common/conflex.c
--- a/external/bsd/dhcp/dist/common/conflex.c   Sun Mar 24 15:45:44 2013 +0000
+++ b/external/bsd/dhcp/dist/common/conflex.c   Sun Mar 24 15:53:58 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: conflex.c,v 1.1.1.1 2013/03/24 15:45:52 christos Exp $ */
+/*     $NetBSD: conflex.c,v 1.2 2013/03/24 15:53:58 christos Exp $     */
 
 /* conflex.c
 
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: conflex.c,v 1.1.1.1 2013/03/24 15:45:52 christos Exp $");
+__RCSID("$NetBSD: conflex.c,v 1.2 2013/03/24 15:53:58 christos Exp $");
 
 #include "dhcpd.h"
 #include <ctype.h>
@@ -388,7 +388,7 @@
  * warning in the GENERAL NOTES ABOUT TOKENS above though.)
  */
 
-enum dhcp_token
+static enum dhcp_token
 do_peek_token(const char **rval, unsigned int *rlen,
              struct parse *cfile, isc_boolean_t raw) {
        int x;
diff -r 42db9dfda14e -r fe169161756f external/bsd/dhcp/dist/common/discover.c
--- a/external/bsd/dhcp/dist/common/discover.c  Sun Mar 24 15:45:44 2013 +0000
+++ b/external/bsd/dhcp/dist/common/discover.c  Sun Mar 24 15:53:58 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: discover.c,v 1.1.1.1 2013/03/24 15:45:52 christos Exp $        */
+/*     $NetBSD: discover.c,v 1.2 2013/03/24 15:53:58 christos Exp $    */
 
 /* discover.c
 
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: discover.c,v 1.1.1.1 2013/03/24 15:45:52 christos Exp $");
+__RCSID("$NetBSD: discover.c,v 1.2 2013/03/24 15:53:58 christos Exp $");
 
 #include "dhcpd.h"
 
@@ -798,7 +798,7 @@
  *
  * The iface_conf_list structure maintains state for this process.
  */
-int 
+static int 
 begin_iface_scan(struct iface_conf_list *ifaces) {
        if (getifaddrs(&ifaces->head) != 0) {
                log_error("Error getting interfaces; %m");
@@ -814,7 +814,7 @@
  * Returns information in the info structure. 
  * Sets err to 1 if there is an error, otherwise 0.
  */
-int
+static int
 next_iface(struct iface_info *info, int *err, struct iface_conf_list *ifaces) {
        if (ifaces->next == NULL) {
                *err = 0;
@@ -838,7 +838,7 @@
 /*
  * End scan of interfaces.
  */
-void
+static void
 end_iface_scan(struct iface_conf_list *ifaces) {
        freeifaddrs(ifaces->head);
        ifaces->head = NULL;
@@ -847,7 +847,7 @@
 #endif 
 
 /* XXX: perhaps create drealloc() rather than do it manually */
-void
+static void
 add_ipv4_addr_to_interface(struct interface_info *iface, 
                           const struct in_addr *addr) {
        /*
@@ -884,7 +884,7 @@
 
 #ifdef DHCPv6
 /* XXX: perhaps create drealloc() rather than do it manually */
-void
+static void
 add_ipv6_addr_to_interface(struct interface_info *iface, 
                           const struct in6_addr *addr) {
        /*
diff -r 42db9dfda14e -r fe169161756f external/bsd/dhcp/dist/common/dispatch.c
--- a/external/bsd/dhcp/dist/common/dispatch.c  Sun Mar 24 15:45:44 2013 +0000
+++ b/external/bsd/dhcp/dist/common/dispatch.c  Sun Mar 24 15:53:58 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dispatch.c,v 1.1.1.1 2013/03/24 15:45:52 christos Exp $        */
+/*     $NetBSD: dispatch.c,v 1.2 2013/03/24 15:53:58 christos Exp $    */
 
 /* dispatch.c
 
@@ -118,7 +118,7 @@
                   isc_result_totext (status));
 }
 
-void
+static void
 isclib_timer_callback(isc_task_t  *taskp,
                      isc_event_t *eventp)
 {
diff -r 42db9dfda14e -r fe169161756f external/bsd/dhcp/dist/common/dns.c
--- a/external/bsd/dhcp/dist/common/dns.c       Sun Mar 24 15:45:44 2013 +0000
+++ b/external/bsd/dhcp/dist/common/dns.c       Sun Mar 24 15:53:58 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dns.c,v 1.1.1.1 2013/03/24 15:45:53 christos Exp $     */
+/*     $NetBSD: dns.c,v 1.2 2013/03/24 15:53:58 christos Exp $ */
 
 /* dns.c
 
@@ -217,7 +217,7 @@
  * 64 bits pointer of cb
  */
 
-void
+static void
 trace_ddns_input_write(dhcp_ddns_cb_t *ddns_cb, isc_result_t result)
 {
        trace_iov_t iov[2];
@@ -318,7 +318,7 @@
  * contents of cb
  */
 
-isc_result_t
+static isc_result_t
 trace_ddns_output_write(dns_client_t *client, dns_rdataclass_t rdclass,
                        dns_name_t *zonename, dns_namelist_t *prerequisites,
                        dns_namelist_t *updates, isc_sockaddrlist_t *servers,
diff -r 42db9dfda14e -r fe169161756f external/bsd/dhcp/dist/common/ns_name.c
--- a/external/bsd/dhcp/dist/common/ns_name.c   Sun Mar 24 15:45:44 2013 +0000
+++ b/external/bsd/dhcp/dist/common/ns_name.c   Sun Mar 24 15:53:58 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ns_name.c,v 1.1.1.1 2013/03/24 15:45:53 christos Exp $ */
+/*     $NetBSD: ns_name.c,v 1.2 2013/03/24 15:53:58 christos Exp $     */
 
 /*
  * Copyright (c) 2004,2009 by Internet Systems Consortium, Inc. ("ISC")
@@ -243,6 +243,7 @@
        return (0);
 }
 
+#ifdef notdef
 /*
  * MRns_name_ntol(src, dst, dstsiz)
  *     Convert a network strings labels into all lowercase.
@@ -252,7 +253,7 @@
  *     Enforces label and domain length limits.
  */
 
-int
+static int
 MRns_name_ntol(const u_char *src, u_char *dst, size_t dstsiz) {
        const u_char *cp;
        u_char *dn, *eom;
@@ -289,6 +290,7 @@
        *dn++ = '\0';
        return (dn - dst);
 }
+#endif
 
 /*
  * MRns_name_unpack(msg, eom, src, dst, dstsiz)
@@ -468,6 +470,7 @@
        return (dstp - dst);
 }
 
+#ifdef notdef
 /*
  * MRns_name_uncompress(msg, eom, src, dst, dstsiz)
  *     Expand compressed domain name to presentation format.
@@ -476,7 +479,7 @@
  * note:
  *     Root domain returns as "." not "".
  */
-int
+static int
 MRns_name_uncompress(const u_char *msg, const u_char *eom, const u_char *src,
                     char *dst, size_t dstsiz)
 {
@@ -489,6 +492,7 @@
                return (-1);
        return (n);
 }
+#endif
 
 /*
  * MRns_name_compress(src, dst, dstsiz, dnptrs, lastdnptr)
@@ -515,13 +519,14 @@
        return (MRns_name_pack(tmp, dst, dstsiz, dnptrs, lastdnptr));
 }
 
+#ifdef notdef
 /*
  * MRns_name_skip(ptrptr, eom)
  *     Advance *ptrptr to skip over the compressed name it points at.
  * return:
  *     0 on success, -1 (with errno set) on failure.
  */
-int
+static int
 MRns_name_skip(const u_char **ptrptr, const u_char *eom) {
        const u_char *cp;
        u_int n;
@@ -549,6 +554,7 @@
        *ptrptr = cp;
        return (0);
 }
+#endif
 
 /* Private. */
 
diff -r 42db9dfda14e -r fe169161756f external/bsd/dhcp/dist/dst/base64.c
--- a/external/bsd/dhcp/dist/dst/base64.c       Sun Mar 24 15:45:44 2013 +0000
+++ b/external/bsd/dhcp/dist/dst/base64.c       Sun Mar 24 15:53:58 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: base64.c,v 1.1.1.1 2013/03/24 15:45:56 christos Exp $  */
+/*     $NetBSD: base64.c,v 1.2 2013/03/24 15:53:58 christos Exp $      */
 
 /*
  * Copyright (c) 2004,2009 by Internet Systems Consortium, Inc. ("ISC")
@@ -69,6 +69,7 @@
 #include "cdefs.h"
 #include "osdep.h"
 #include "arpa/nameser.h"
+#include "dst_internal.h"
 
 #define Assert(Cond) if (!(Cond)) abort()
 
@@ -206,10 +207,8 @@
  */
 
 int
-b64_pton(src, target, targsize)
-       char const *src;
-       u_char *target;
-       size_t targsize;
+/*###207 [cc] error: no previous prototype for 'b64_pton'%%%*/
+b64_pton(char const *src, u_char *target, size_t targsize)
 {
        int tarindex, state, ch;
        char *pos;
diff -r 42db9dfda14e -r fe169161756f external/bsd/dhcp/dist/includes/dhcpd.h
--- a/external/bsd/dhcp/dist/includes/dhcpd.h   Sun Mar 24 15:45:44 2013 +0000
+++ b/external/bsd/dhcp/dist/includes/dhcpd.h   Sun Mar 24 15:53:58 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dhcpd.h,v 1.1.1.1 2013/03/24 15:45:50 christos Exp $   */
+/*     $NetBSD: dhcpd.h,v 1.2 2013/03/24 15:53:58 christos Exp $       */
 



Home | Main Index | Thread Index | Old Index