From 77b0c6096a2d8b5f8d49ac7b2317754fbb1000e8 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Wed, 17 Oct 2012 18:08:46 +0200 Subject: [PATCH] Remove more unused variables in userland. Found-by: gcc47 --- lib/libipsec/pfkey_dump.c | 8 +------- lib/libstand/tftp.c | 4 ---- sbin/ping6/ping6.c | 3 +-- usr.bin/split/split.c | 4 ---- usr.bin/tail/forward.c | 4 ---- usr.bin/ypwhich/ypwhich.c | 5 ++--- usr.sbin/IPXrouted/tables.c | 2 -- usr.sbin/atm/scspd/scsp_config.c | 3 --- usr.sbin/atm/scspd/scsp_output.c | 3 --- usr.sbin/config/mkmakefile.c | 3 +-- usr.sbin/faithd/prefix.c | 5 ----- usr.sbin/installer/dfuibe_installer/fn_zonetab.c | 2 -- usr.sbin/installer/dfuife_curses/curses_form.c | 6 ++---- usr.sbin/installer/dfuife_curses/main.c | 2 -- usr.sbin/installer/libaura/popen.c | 5 ++--- usr.sbin/kbdmap/kbdmap.c | 3 --- usr.sbin/moused/moused.c | 3 +-- usr.sbin/ndiscvt/ndiscvt.c | 2 +- usr.sbin/nscd/cacheplcs.c | 4 ---- usr.sbin/ppp/iface.c | 4 +--- usr.sbin/ppp/physical.c | 3 +-- usr.sbin/pw/pw_log.c | 2 -- usr.sbin/quot/quot.c | 4 +--- usr.sbin/rarpd/rarpd.c | 4 +--- 24 files changed, 15 insertions(+), 73 deletions(-) diff --git a/lib/libipsec/pfkey_dump.c b/lib/libipsec/pfkey_dump.c index 48d6f50e57..326617d5f4 100644 --- a/lib/libipsec/pfkey_dump.c +++ b/lib/libipsec/pfkey_dump.c @@ -212,10 +212,8 @@ pfkey_sadump(struct sadb_msg *m) struct sadb_sa *m_sa; struct sadb_x_sa2 *m_sa2; struct sadb_lifetime *m_lftc, *m_lfth, *m_lfts; - struct sadb_address *m_saddr, *m_daddr, *m_paddr; + struct sadb_address *m_saddr, *m_daddr; struct sadb_key *m_auth, *m_enc; - struct sadb_ident *m_sid, *m_did; - struct sadb_sens *m_sens; /* check pfkey message. */ if (pfkey_align(m, mhp)) { @@ -234,12 +232,8 @@ pfkey_sadump(struct sadb_msg *m) m_lfts = (struct sadb_lifetime *)mhp[SADB_EXT_LIFETIME_SOFT]; m_saddr = (struct sadb_address *)mhp[SADB_EXT_ADDRESS_SRC]; m_daddr = (struct sadb_address *)mhp[SADB_EXT_ADDRESS_DST]; - m_paddr = (struct sadb_address *)mhp[SADB_EXT_ADDRESS_PROXY]; m_auth = (struct sadb_key *)mhp[SADB_EXT_KEY_AUTH]; m_enc = (struct sadb_key *)mhp[SADB_EXT_KEY_ENCRYPT]; - m_sid = (struct sadb_ident *)mhp[SADB_EXT_IDENTITY_SRC]; - m_did = (struct sadb_ident *)mhp[SADB_EXT_IDENTITY_DST]; - m_sens = (struct sadb_sens *)mhp[SADB_EXT_SENSITIVITY]; /* source address */ if (m_saddr == NULL) { diff --git a/lib/libstand/tftp.c b/lib/libstand/tftp.c index ec440374fe..7c9af52e42 100644 --- a/lib/libstand/tftp.c +++ b/lib/libstand/tftp.c @@ -31,7 +31,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/lib/libstand/tftp.c,v 1.2.6.4 2001/07/14 14:00:03 mikeh Exp $ - * $DragonFly: src/lib/libstand/tftp.c,v 1.5 2005/12/11 02:27:26 swildner Exp $ */ /* @@ -406,9 +405,6 @@ tftp_write(struct open_file *f, void *start, size_t size, size_t *resid) static int tftp_stat(struct open_file *f, struct stat *sb) { - struct tftp_handle __unused *tftpfile; - tftpfile = (struct tftp_handle *) f->f_fsdata; - sb->st_mode = 0444 | S_IFREG; sb->st_nlink = 1; sb->st_uid = 0; diff --git a/sbin/ping6/ping6.c b/sbin/ping6/ping6.c index d7c54ac8fa..0bc55310fe 100644 --- a/sbin/ping6/ping6.c +++ b/sbin/ping6/ping6.c @@ -1694,7 +1694,7 @@ pr_ip6opt(void *extbuf, size_t bufsize) struct ip6_hbh *ext; int currentlen; u_int8_t type; - socklen_t extlen, len, __unused origextlen; + socklen_t extlen, len; void *databuf; size_t offset; u_int16_t value2; @@ -1710,7 +1710,6 @@ pr_ip6opt(void *extbuf, size_t bufsize) * subtract the size of a cmsg structure from the buffer size. */ if (bufsize < (extlen + CMSG_SPACE(0))) { - origextlen = extlen; extlen = bufsize - CMSG_SPACE(0); warnx("options truncated, showing only %u (total=%u)", (unsigned int)(extlen / 8 - 1), diff --git a/usr.bin/split/split.c b/usr.bin/split/split.c index 5fbc26e704..3df8433fdd 100644 --- a/usr.bin/split/split.c +++ b/usr.bin/split/split.c @@ -33,7 +33,6 @@ * @(#) Copyright (c) 1987, 1993, 1994 The Regents of the University of California. All rights reserved. * @(#)split.c 8.2 (Berkeley) 4/16/94 * $FreeBSD: src/usr.bin/split/split.c,v 1.6.2.2 2002/07/25 12:46:36 tjr Exp $ - * $DragonFly: src/usr.bin/split/split.c,v 1.6 2005/08/30 21:19:13 liamfoy Exp $ */ #include @@ -302,17 +301,14 @@ newfile(void) { long i, maxfiles, tfnum; static long fnum; - static int defname; static char *fpnt; if (ofd == -1) { if (fname[0] == '\0') { fname[0] = 'x'; fpnt = fname + 1; - defname = 1; } else { fpnt = fname + strlen(fname); - defname = 0; } ofd = fileno(stdout); } diff --git a/usr.bin/tail/forward.c b/usr.bin/tail/forward.c index e9b01d9762..9debde3971 100644 --- a/usr.bin/tail/forward.c +++ b/usr.bin/tail/forward.c @@ -35,7 +35,6 @@ * * @(#)forward.c 8.1 (Berkeley) 6/6/93 * $FreeBSD: src/usr.bin/tail/forward.c,v 1.11.6.7 2003/01/07 05:26:22 tjr Exp $ - * $DragonFly: src/usr.bin/tail/forward.c,v 1.6 2005/03/01 21:37:33 cpressey Exp $ */ #include @@ -306,13 +305,10 @@ void follow(file_info_t *files, enum STYLE style, off_t off) { int active, i, n; - long spin; file_info_t *file; struct stat sb2; struct timespec ts; - spin = 1; - /* Position each of the files */ file = files; active = 0; diff --git a/usr.bin/ypwhich/ypwhich.c b/usr.bin/ypwhich/ypwhich.c index d28927e9a2..2540f04f70 100644 --- a/usr.bin/ypwhich/ypwhich.c +++ b/usr.bin/ypwhich/ypwhich.c @@ -27,7 +27,6 @@ * SUCH DAMAGE. * * $FreeBSD: src/usr.bin/ypwhich/ypwhich.c,v 1.16 2004/04/04 19:17:38 charnier Exp $ - * $DragonFly: src/usr.bin/ypwhich/ypwhich.c,v 1.3 2003/10/04 20:36:55 hmp Exp $ */ #include @@ -142,11 +141,11 @@ main(int argc, char **argv) struct ypmaplist *ypml, *y; struct hostent *hent; struct sockaddr_in lsin; - int notrans, mode, getmap; + int notrans, mode; int c, r; u_int i; - getmap = notrans = mode = 0; + notrans = mode = 0; while ((c = getopt(argc, argv, "xd:mt")) != -1) switch (c) { case 'x': diff --git a/usr.sbin/IPXrouted/tables.c b/usr.sbin/IPXrouted/tables.c index 8d34509eaf..d2da2135aa 100644 --- a/usr.sbin/IPXrouted/tables.c +++ b/usr.sbin/IPXrouted/tables.c @@ -170,7 +170,6 @@ rtadd_clone(struct rt_entry *ort, struct sockaddr *dst, struct sockaddr *gate, { struct afhash h; struct rt_entry *rt; - struct rthash *rh; int af = dst->sa_family, flags; u_int hash; @@ -181,7 +180,6 @@ rtadd_clone(struct rt_entry *ort, struct sockaddr *dst, struct sockaddr *gate, (*afswitch[af].af_hash)(dst, &h); flags = (*afswitch[af].af_ishost)(dst) ? RTF_HOST : 0; hash = h.afh_nethash; - rh = &nethash[hash & ROUTEHASHMASK]; rt = (struct rt_entry *)malloc(sizeof (*rt)); if (rt == NULL) return; diff --git a/usr.sbin/atm/scspd/scsp_config.c b/usr.sbin/atm/scspd/scsp_config.c index 7b8b0813de..0f27791e54 100644 --- a/usr.sbin/atm/scspd/scsp_config.c +++ b/usr.sbin/atm/scspd/scsp_config.c @@ -24,7 +24,6 @@ * notice must be reproduced on all copies. * * @(#) $FreeBSD: src/usr.sbin/atm/scspd/scsp_config.c,v 1.3 1999/08/28 01:15:32 peter Exp $ - * @(#) $DragonFly: src/usr.sbin/atm/scspd/scsp_config.c,v 1.4 2003/11/15 20:33:43 eirikn Exp $ */ /* @@ -210,7 +209,6 @@ finish_dcs(void) { int rc = 0; Scsp_dcs *dcsp; - Scsp_server *ssp; /* * Make sure we have a current server block and DCS block @@ -224,7 +222,6 @@ finish_dcs(void) parse_error("server not found"); return(1); } - ssp = current_server; dcsp = current_dcs; /* diff --git a/usr.sbin/atm/scspd/scsp_output.c b/usr.sbin/atm/scspd/scsp_output.c index aeddbc0c98..36a695f749 100644 --- a/usr.sbin/atm/scspd/scsp_output.c +++ b/usr.sbin/atm/scspd/scsp_output.c @@ -24,7 +24,6 @@ * notice must be reproduced on all copies. * * @(#) $FreeBSD: src/usr.sbin/atm/scspd/scsp_output.c,v 1.3 1999/08/28 01:15:33 peter Exp $ - * @(#) $DragonFly: src/usr.sbin/atm/scspd/scsp_output.c,v 1.4 2004/12/18 22:48:02 swildner Exp $ */ /* @@ -563,13 +562,11 @@ static int scsp_format_csu(Scsp_csu_msg *csup, char *buff, int blen) { int i, len, proc_len; - struct scsp_ncsu_msg *scsup; Scsp_csa *csap; /* * Format the mandatory common part of the message */ - scsup = (struct scsp_ncsu_msg *)buff; len = scsp_format_mcp(&csup->csu_mcp, buff); if (len == 0) goto csu_invalid; diff --git a/usr.sbin/config/mkmakefile.c b/usr.sbin/config/mkmakefile.c index 6e0854fb37..02ea961418 100644 --- a/usr.sbin/config/mkmakefile.c +++ b/usr.sbin/config/mkmakefile.c @@ -704,7 +704,7 @@ tail(char *fn) static void do_rules(FILE *f) { - char *cp, *np, och, *tp; + char *cp, *np, och; struct file_list *ftp; char *special; @@ -735,7 +735,6 @@ do_rules(FILE *f) fprintf(f, "%so: $S/%s%c\n", tail(np), np, och); } - tp = tail(np); special = ftp->f_special; if (special == NULL) { const char *ftype = NULL; diff --git a/usr.sbin/faithd/prefix.c b/usr.sbin/faithd/prefix.c index 4fadcf7609..06b21dbc33 100644 --- a/usr.sbin/faithd/prefix.c +++ b/usr.sbin/faithd/prefix.c @@ -1,6 +1,5 @@ /* $KAME: prefix.c,v 1.9 2001/07/02 14:36:49 itojun Exp $ */ /* $FreeBSD: src/usr.sbin/faithd/prefix.c,v 1.1.2.2 2002/04/28 05:40:29 suz Exp $ */ -/* $DragonFly: src/usr.sbin/faithd/prefix.c,v 1.4 2003/11/16 14:10:45 eirikn Exp $ */ /* * Copyright (C) 2000 WIDE Project. @@ -68,7 +67,6 @@ prefix_set(const char *s, struct prefix *prefix, int slash) char *p, *q, *r; struct addrinfo hints, *res = NULL; int max; - char *a; p = strdup(s); q = strchr(p, '/'); @@ -91,14 +89,11 @@ prefix_set(const char *s, struct prefix *prefix, int slash) switch (prefix->a.ss_family) { case AF_INET: max = 32; - a = (char *)&((struct sockaddr_in *)&prefix->a)->sin_addr; break; case AF_INET6: max = 128; - a = (char *)&((struct sockaddr_in6 *)&prefix->a)->sin6_addr; break; default: - a = NULL; max = -1; break; } diff --git a/usr.sbin/installer/dfuibe_installer/fn_zonetab.c b/usr.sbin/installer/dfuibe_installer/fn_zonetab.c index bdb344d451..69eedb2310 100644 --- a/usr.sbin/installer/dfuibe_installer/fn_zonetab.c +++ b/usr.sbin/installer/dfuibe_installer/fn_zonetab.c @@ -95,7 +95,6 @@ zt_parse(struct zonetab *head) { struct zonetab *c; struct zt_parse zp; char *file; - int i; zone_tab = fopen(ZONETAB_FILE, "r"); stat(ZONETAB_FILE, &sb); @@ -104,7 +103,6 @@ zt_parse(struct zonetab *head) { zp.buf = file; zp.state = ZT_CC; - i = 0; c = head; do { diff --git a/usr.sbin/installer/dfuife_curses/curses_form.c b/usr.sbin/installer/dfuife_curses/curses_form.c index d980643ea8..44ab7b83a0 100644 --- a/usr.sbin/installer/dfuife_curses/curses_form.c +++ b/usr.sbin/installer/dfuife_curses/curses_form.c @@ -719,9 +719,8 @@ curses_form_refocus_after_scroll(struct curses_form *cf, int dx, int dy) int curses_form_widget_is_visible(struct curses_widget *w) { - unsigned int wx, wy; + unsigned int wy; - wx = w->x + 1 - w->form->x_offset; wy = w->y + 1 - w->form->y_offset; if (wy < 1 || wy > w->form->height) @@ -733,7 +732,7 @@ curses_form_widget_is_visible(struct curses_widget *w) void curses_form_widget_ensure_visible(struct curses_widget *w) { - unsigned int wx, wy; + unsigned int wy; int dx = 0, dy = 0; /* @@ -750,7 +749,6 @@ curses_form_widget_ensure_visible(struct curses_widget *w) if (curses_form_widget_is_visible(w)) return; - wx = w->x + 1 - w->form->x_offset; wy = w->y + 1 - w->form->y_offset; if (wy < 1) diff --git a/usr.sbin/installer/dfuife_curses/main.c b/usr.sbin/installer/dfuife_curses/main.c index 0023a16000..67c3a96342 100644 --- a/usr.sbin/installer/dfuife_curses/main.c +++ b/usr.sbin/installer/dfuife_curses/main.c @@ -148,7 +148,6 @@ main(int argc, char **argv) int done = 0; char msgtype; int opt; - int last_amount = 0; char last_message[80]; int is_streaming = 0; int ch; @@ -264,7 +263,6 @@ main(int argc, char **argv) if (pf != NULL) curses_form_free(pf); is_streaming = dfui_progress_get_streaming(pr); - last_amount = dfui_progress_get_amount(pr); strncpy(last_message, dfui_info_get_short_desc( dfui_progress_get_info(pr)), 79); pf = curses_form_construct_from_dfui_progress(pr, diff --git a/usr.sbin/installer/libaura/popen.c b/usr.sbin/installer/libaura/popen.c index 5a96e2563c..774413f65e 100644 --- a/usr.sbin/installer/libaura/popen.c +++ b/usr.sbin/installer/libaura/popen.c @@ -35,7 +35,6 @@ * SUCH DAMAGE. * * $FreeBSD: src/lib/libc/gen/popen.c,v 1.14 2000/01/27 23:06:19 jasone Exp $ - * $DragonFly: src/contrib/bsdinstaller-1.1.6/src/lib/libaura/popen.c,v 1.1.1.1 2008/03/12 22:15:54 dave Exp $ * $Id: popen.c,v 1.6 2005/02/06 06:57:30 cpressey Exp $ * * @(#)popen.c 8.3 (Berkeley) 5/3/95 @@ -219,10 +218,10 @@ aura_pclose(FILE *iop) pid_t aura_pgetpid(FILE *iop) { - struct pid *cur, *last; + struct pid *cur; /* Find the appropriate file pointer. */ - for (last = NULL, cur = pidlist; cur; last = cur, cur = cur->next) + for (cur = pidlist; cur; cur = cur->next) if (cur->fp == iop) break; if (cur == NULL) diff --git a/usr.sbin/kbdmap/kbdmap.c b/usr.sbin/kbdmap/kbdmap.c index 6330363e44..7da13a6c29 100644 --- a/usr.sbin/kbdmap/kbdmap.c +++ b/usr.sbin/kbdmap/kbdmap.c @@ -325,7 +325,6 @@ show_dialog(struct keymap **km_sorted, int num_keymaps) FILE *fp; char *cmd, *dialog; char tmp_name[] = "/tmp/_kbd_lang.XXXX"; - const char *ext; int fd, i, size; fd = mkstemp(tmp_name); @@ -337,8 +336,6 @@ show_dialog(struct keymap **km_sorted, int num_keymaps) asprintf(&dialog, "/usr/bin/dialog --clear --title \"Keyboard Menu\" " "--menu \"%s\" -1 -1 10", menu); - ext = extract_name(dir); - /* start right font, assume that current font is equal * to default font in /etc/rc.conf * diff --git a/usr.sbin/moused/moused.c b/usr.sbin/moused/moused.c index d1937b63a0..b41cc23323 100644 --- a/usr.sbin/moused/moused.c +++ b/usr.sbin/moused/moused.c @@ -3002,7 +3002,7 @@ kidspad(u_char rxc, mousestatus_t *act) static int buf[5]; static int buflen = 0, b_prev = 0 , x_prev = -1, y_prev = -1 ; static k_status status = S_IDLE ; - static struct timeval old, now ; + static struct timeval now ; int x, y ; @@ -3040,7 +3040,6 @@ kidspad(u_char rxc, mousestatus_t *act) x_prev = x ; y_prev = y ; } - old = now ; act->dx = x - x_prev ; act->dy = y - y_prev ; if (act->dx || act->dy) diff --git a/usr.sbin/ndiscvt/ndiscvt.c b/usr.sbin/ndiscvt/ndiscvt.c index aa850e790f..3f59a12fae 100644 --- a/usr.sbin/ndiscvt/ndiscvt.c +++ b/usr.sbin/ndiscvt/ndiscvt.c @@ -97,7 +97,7 @@ insert_padding(void **imgbase, int *imglen) image_dos_header *dos_hdr; image_nt_header *nt_hdr; image_optional_header opt_hdr; - int i = 0, sections, curlen = 0; + int i = 0, sections; int offaccum = 0, oldraddr, oldrlen; uint8_t *newimg, *tmp; diff --git a/usr.sbin/nscd/cacheplcs.c b/usr.sbin/nscd/cacheplcs.c index 259a8bb66a..a14ccb9023 100644 --- a/usr.sbin/nscd/cacheplcs.c +++ b/usr.sbin/nscd/cacheplcs.c @@ -153,11 +153,9 @@ static struct cache_policy_item_ * cache_queue_policy_get_next_item(struct cache_policy_ *policy, struct cache_policy_item_ *item) { - struct cache_queue_policy_ *queue_policy; struct cache_queue_policy_item_ *queue_item; TRACE_IN(cache_queue_policy_get_next_item); - queue_policy = (struct cache_queue_policy_ *)policy; queue_item = (struct cache_queue_policy_item_ *)item; TRACE_OUT(cache_queue_policy_get_next_item); @@ -168,11 +166,9 @@ static struct cache_policy_item_ * cache_queue_policy_get_prev_item(struct cache_policy_ *policy, struct cache_policy_item_ *item) { - struct cache_queue_policy_ *queue_policy; struct cache_queue_policy_item_ *queue_item; TRACE_IN(cache_queue_policy_get_prev_item); - queue_policy = (struct cache_queue_policy_ *)policy; queue_item = (struct cache_queue_policy_item_ *)item; TRACE_OUT(cache_queue_policy_get_prev_item); diff --git a/usr.sbin/ppp/iface.c b/usr.sbin/ppp/iface.c index 660ba59f5e..311667c5a4 100644 --- a/usr.sbin/ppp/iface.c +++ b/usr.sbin/ppp/iface.c @@ -24,7 +24,6 @@ * SUCH DAMAGE. * * $FreeBSD: src/usr.sbin/ppp/iface.c,v 1.13.2.9 2003/04/29 16:04:41 ume Exp $ - * $DragonFly: src/usr.sbin/ppp/iface.c,v 1.3 2004/02/03 07:11:47 dillon Exp $ */ #include @@ -374,12 +373,11 @@ iface_addr_Add(const char *name, struct iface_addr *addr, int s) void iface_Clear(struct iface *iface, struct ncp *ncp, int family, int how) { - int addrs, af, inskip, in6skip, s4 = -1, s6 = -1, *s; + int af, inskip, in6skip, s4 = -1, s6 = -1, *s; unsigned n; if (iface->addrs) { inskip = in6skip = how == IFACE_CLEAR_ALL ? 0 : 1; - addrs = 0; for (n = 0; n < iface->addrs; n++) { af = ncprange_family(&iface->addr[n].ifa); diff --git a/usr.sbin/ppp/physical.c b/usr.sbin/ppp/physical.c index ae0060f6fb..4413a123b5 100644 --- a/usr.sbin/ppp/physical.c +++ b/usr.sbin/ppp/physical.c @@ -579,7 +579,7 @@ iov2physical(struct datalink *dl, struct iovec *iov, int *niov, int maxiov, int fd, int *auxfd, int *nauxfd) { struct physical *p; - int len, type; + int type; unsigned h; p = (struct physical *)iov[(*niov)++].iov_base; @@ -592,7 +592,6 @@ iov2physical(struct datalink *dl, struct iovec *iov, int *niov, int maxiov, p->desc.Write = physical_DescriptorWrite; p->type = PHYS_DIRECT; p->dl = dl; - len = strlen(_PATH_DEV); p->out = NULL; p->connect_count = 1; diff --git a/usr.sbin/pw/pw_log.c b/usr.sbin/pw/pw_log.c index e432b6b389..bcadec6e19 100644 --- a/usr.sbin/pw/pw_log.c +++ b/usr.sbin/pw/pw_log.c @@ -44,7 +44,6 @@ pw_log(struct userconf * cnf, int mode, int which, char const * fmt,...) } if (logfile != NULL) { va_list argp; - int l; time_t now = time(NULL); struct tm *t = localtime(&now); char nfmt[256]; @@ -54,7 +53,6 @@ pw_log(struct userconf * cnf, int mode, int which, char const * fmt,...) name = "unknown"; /* ISO 8601 International Standard Date format */ strftime(nfmt, sizeof nfmt, "%Y-%m-%d %T ", t); - l = strlen(nfmt); sprintf(nfmt + strlen(nfmt), "[%s:%s%s] %s\n", name, Which[which], Modes[mode], fmt); va_start(argp, fmt); vfprintf(logfile, nfmt, argp); diff --git a/usr.sbin/quot/quot.c b/usr.sbin/quot/quot.c index dbd5b138ac..09654ad78f 100644 --- a/usr.sbin/quot/quot.c +++ b/usr.sbin/quot/quot.c @@ -443,7 +443,7 @@ static void donames(int fd, struct fs *super, char *name) { int c; - ino_t inode, inode1; + ino_t inode; ino_t maxino; struct ufs1_dinode *ip; @@ -452,7 +452,6 @@ donames(int fd, struct fs *super, char *name) while ((c = getchar()) != EOF && (c < '0' || c > '9')) while ((c = getchar()) != EOF && c != '\n'); ungetc(c,stdin); - inode1 = -1; while (scanf("%"SCNuMAX,&inode) == 1) { if (inode > maxino) { warnx("illegal inode %ju",(uintmax_t)inode); @@ -470,7 +469,6 @@ donames(int fd, struct fs *super, char *name) c = getchar(); } putchar('\n'); - inode1 = inode; } else { if (errno) { err(1, "%s", name); diff --git a/usr.sbin/rarpd/rarpd.c b/usr.sbin/rarpd/rarpd.c index b52f410b54..69ab61e3eb 100644 --- a/usr.sbin/rarpd/rarpd.c +++ b/usr.sbin/rarpd/rarpd.c @@ -15,7 +15,6 @@ * * @(#) Copyright (c) 1990, 1991, 1992, 1993, 1996 The Regents of the University of California. All rights reserved. * $FreeBSD: src/usr.sbin/rarpd/rarpd.c,v 1.41 2004/08/07 04:28:54 imp Exp $ - * $DragonFly: src/usr.sbin/rarpd/rarpd.c,v 1.4 2004/12/18 22:48:05 swildner Exp $ */ /* @@ -116,7 +115,7 @@ int main(int argc, char *argv[]) { int op; - char *ifname, *hostname, *name; + char *ifname, *name; int aflag = 0; /* listen on "all" interfaces */ int fflag = 0; /* don't fork */ @@ -168,7 +167,6 @@ main(int argc, char *argv[]) argv += optind; ifname = (aflag == 0) ? argv[0] : NULL; - hostname = ifname ? argv[1] : argv[0]; if ((aflag && ifname) || (!aflag && ifname == NULL)) usage(); -- 2.41.0