Source-Changes-HG archive

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

[src/trunk]: src/external/bsd/ntp/dist fix unused variable warnings



details:   https://anonhg.NetBSD.org/src/rev/fc051d86c8bd
branches:  trunk
changeset: 790744:fc051d86c8bd
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Oct 20 02:47:38 2013 +0000

description:
fix unused variable warnings

diffstat:

 external/bsd/ntp/dist/libntp/icom.c          |  4 +---
 external/bsd/ntp/dist/ntpd/ntp_crypto.c      |  4 +---
 external/bsd/ntp/dist/ntpd/ntp_proto.c       |  5 ++---
 external/bsd/ntp/dist/ntpd/refclock_acts.c   |  4 +---
 external/bsd/ntp/dist/ntpd/refclock_chu.c    |  6 +-----
 external/bsd/ntp/dist/ntpd/refclock_irig.c   |  4 +---
 external/bsd/ntp/dist/ntpd/refclock_oncore.c |  6 ++----
 external/bsd/ntp/dist/sntp/main.c            |  6 +++---
 8 files changed, 12 insertions(+), 27 deletions(-)

diffs (196 lines):

diff -r ef74ad7dd9e5 -r fc051d86c8bd external/bsd/ntp/dist/libntp/icom.c
--- a/external/bsd/ntp/dist/libntp/icom.c       Sun Oct 20 00:29:10 2013 +0000
+++ b/external/bsd/ntp/dist/libntp/icom.c       Sun Oct 20 02:47:38 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: icom.c,v 1.3 2012/02/01 07:46:22 kardel Exp $  */
+/*     $NetBSD: icom.c,v 1.4 2013/10/20 02:47:38 christos Exp $        */
 
 /*
  * Program to control ICOM radios
@@ -129,11 +129,9 @@
 {
        TTY ttyb;
        int fd;
-       int flags;
        int rc;
        int saved_errno;
 
-       flags = trace;
        fd = tty_open(device, O_RDWR, 0777);
        if (fd < 0)
                return -1;
diff -r ef74ad7dd9e5 -r fc051d86c8bd external/bsd/ntp/dist/ntpd/ntp_crypto.c
--- a/external/bsd/ntp/dist/ntpd/ntp_crypto.c   Sun Oct 20 00:29:10 2013 +0000
+++ b/external/bsd/ntp/dist/ntpd/ntp_crypto.c   Sun Oct 20 02:47:38 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ntp_crypto.c,v 1.4 2012/02/01 07:46:22 kardel Exp $    */
+/*     $NetBSD: ntp_crypto.c,v 1.5 2013/10/20 02:47:38 christos Exp $  */
 
 /*
  * ntp_crypto.c - NTP version 4 public key routines
@@ -393,7 +393,6 @@
        int     has_mac;        /* length of MAC field */
        int     authlen;        /* offset of MAC field */
        associd_t associd;      /* association ID */
-       tstamp_t tstamp = 0;    /* timestamp */
        tstamp_t fstamp = 0;    /* filestamp */
        u_int   len;            /* extension field length */
        u_int   code;           /* extension field opcode */
@@ -443,7 +442,6 @@
                }
 
                if (len >= VALUE_LEN) {
-                       tstamp = ntohl(ep->tstamp);
                        fstamp = ntohl(ep->fstamp);
                        vallen = ntohl(ep->vallen);
                }
diff -r ef74ad7dd9e5 -r fc051d86c8bd external/bsd/ntp/dist/ntpd/ntp_proto.c
--- a/external/bsd/ntp/dist/ntpd/ntp_proto.c    Sun Oct 20 00:29:10 2013 +0000
+++ b/external/bsd/ntp/dist/ntpd/ntp_proto.c    Sun Oct 20 02:47:38 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ntp_proto.c,v 1.3 2012/02/01 07:46:22 kardel Exp $     */
+/*     $NetBSD: ntp_proto.c,v 1.4 2013/10/20 02:47:38 christos Exp $   */
 
 /*
  * ntp_proto.c - NTP version 4 protocol machinery
@@ -2220,7 +2220,7 @@
        struct peer *peer;
        int     i, j, k, n;
        int     nlist, nl3;
-       int     allow, osurv;
+       int     allow;
        double  d, e, f, g;
        double  high, low;
        double  seljitter;
@@ -2249,7 +2249,6 @@
         * enough to handle all associations.
         */
        osys_peer = sys_peer;
-       osurv = sys_survivors;
        sys_survivors = 0;
 #ifdef LOCKCLOCK
        sys_leap = LEAP_NOTINSYNC;
diff -r ef74ad7dd9e5 -r fc051d86c8bd external/bsd/ntp/dist/ntpd/refclock_acts.c
--- a/external/bsd/ntp/dist/ntpd/refclock_acts.c        Sun Oct 20 00:29:10 2013 +0000
+++ b/external/bsd/ntp/dist/ntpd/refclock_acts.c        Sun Oct 20 02:47:38 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: refclock_acts.c,v 1.4 2012/02/01 07:46:22 kardel Exp $ */
+/*     $NetBSD: refclock_acts.c,v 1.5 2013/10/20 02:47:38 christos Exp $       */
 
 /*
  * refclock_acts - clock driver for the NIST/USNO/PTB/NPL Computer Time
@@ -638,7 +638,6 @@
        struct peer *peer
        )
 {
-       struct actsunit *up;
        struct refclockproc *pp;
 
        /*
@@ -647,7 +646,6 @@
         * the timeout routine and state machine.
         */
        pp = peer->procptr;
-       up = (struct actsunit *)pp->unitptr;
        switch (peer->ttl) {
 
        /*
diff -r ef74ad7dd9e5 -r fc051d86c8bd external/bsd/ntp/dist/ntpd/refclock_chu.c
--- a/external/bsd/ntp/dist/ntpd/refclock_chu.c Sun Oct 20 00:29:10 2013 +0000
+++ b/external/bsd/ntp/dist/ntpd/refclock_chu.c Sun Oct 20 02:47:38 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: refclock_chu.c,v 1.1.1.2 2012/01/31 21:25:55 kardel Exp $      */
+/*     $NetBSD: refclock_chu.c,v 1.2 2013/10/20 02:47:38 christos Exp $        */
 
 /*
  * refclock_chu - clock driver for Canadian CHU time/frequency station
@@ -966,15 +966,11 @@
        struct recvbuf *rbufp   /* receive buffer structure pointer */
        )
 {
-       struct chuunit *up;
-       struct refclockproc *pp;
        struct peer *peer;
 
        u_char  *dpt;           /* receive buffer pointer */
 
        peer = (struct peer *)rbufp->recv_srcclock;
-       pp = peer->procptr;
-       up = (struct chuunit *)pp->unitptr;
 
        dpt = (u_char *)&rbufp->recv_space;
        chu_decode(peer, *dpt, rbufp->recv_time);
diff -r ef74ad7dd9e5 -r fc051d86c8bd external/bsd/ntp/dist/ntpd/refclock_irig.c
--- a/external/bsd/ntp/dist/ntpd/refclock_irig.c        Sun Oct 20 00:29:10 2013 +0000
+++ b/external/bsd/ntp/dist/ntpd/refclock_irig.c        Sun Oct 20 02:47:38 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: refclock_irig.c,v 1.1.1.2 2012/01/31 21:24:51 kardel Exp $     */
+/*     $NetBSD: refclock_irig.c,v 1.2 2013/10/20 02:47:38 christos Exp $       */
 
 /*
  * refclock_irig - audio IRIG-B/E demodulator/decoder
@@ -983,10 +983,8 @@
        )
 {
        struct refclockproc *pp;
-       struct irigunit *up;
 
        pp = peer->procptr;
-       up = (struct irigunit *)pp->unitptr;
 
        if (pp->coderecv == pp->codeproc) {
                refclock_report(peer, CEVNT_TIMEOUT);
diff -r ef74ad7dd9e5 -r fc051d86c8bd external/bsd/ntp/dist/ntpd/refclock_oncore.c
--- a/external/bsd/ntp/dist/ntpd/refclock_oncore.c      Sun Oct 20 00:29:10 2013 +0000
+++ b/external/bsd/ntp/dist/ntpd/refclock_oncore.c      Sun Oct 20 02:47:38 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: refclock_oncore.c,v 1.6 2012/02/01 07:46:22 kardel Exp $       */
+/*     $NetBSD: refclock_oncore.c,v 1.7 2013/10/20 02:47:38 christos Exp $     */
 
 /*
  * ----------------------------------------------------------------------------
@@ -2507,7 +2507,7 @@
        size_t  len
        )
 {
-       int     chan, id, subframe, valid, page, i, j, tow;
+       int     subframe, valid, page, i, j, tow;
        int     day_now, day_lsf;
        const char *cp = NULL /* XXX gcc */;
        char Msg[120];
@@ -2521,8 +2521,6 @@
        day_now = day_lsf = 0;
        cp = NULL;      /* keep gcc happy */
 
-       chan = buf[4] & 0377;
-       id   = buf[5] & 0377;
        subframe = buf[6] & 017;
        valid = (buf[6] >> 4) & 017;
        page = buf[7];
diff -r ef74ad7dd9e5 -r fc051d86c8bd external/bsd/ntp/dist/sntp/main.c
--- a/external/bsd/ntp/dist/sntp/main.c Sun Oct 20 00:29:10 2013 +0000
+++ b/external/bsd/ntp/dist/sntp/main.c Sun Oct 20 02:47:38 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.6 2012/02/03 21:35:55 christos Exp $        */
+/*     $NetBSD: main.c,v 1.7 2013/10/20 02:47:38 christos Exp $        */
 
 #include <config.h>
 
@@ -365,7 +365,7 @@
        int key_id = 0;
        struct timeval tv_xmt;
        struct pkt x_pkt;
-       int error, rpktl, handle_pkt_res;
+       int rpktl, handle_pkt_res;
 
 
        if (ENABLED_OPT(AUTHENTICATION)) {
@@ -375,7 +375,7 @@
        for (try=0; try<5; try++) {
                memset(&r_pkt, 0, sizeof rbuf);
                
-               error = GETTIMEOFDAY(&tv_xmt, (struct timezone *)NULL);
+               (void)GETTIMEOFDAY(&tv_xmt, (struct timezone *)NULL);
                tv_xmt.tv_sec += JAN_1970;
 
 #ifdef DEBUG



Home | Main Index | Thread Index | Old Index