diff --git a/usr.bin/du/du.c b/usr.bin/du/du.c index ed85eb67382b..8af4c460bad4 100644 --- a/usr.bin/du/du.c +++ b/usr.bin/du/du.c @@ -307,7 +307,7 @@ linkchk(FTSENT *p) struct links_entry *le, **new_buckets; struct stat *st; size_t i, new_size; - int count, hash; + int hash; st = p->fts_statp; @@ -325,7 +325,6 @@ linkchk(FTSENT *p) if (number_entries > number_buckets * 10 && !stop_allocating) { new_size = number_buckets * 2; new_buckets = malloc(new_size * sizeof(struct links_entry *)); - count = 0; /* Try releasing the free list to see if that helps. */ if (new_buckets == NULL && free_list != NULL) { diff --git a/usr.bin/id/id.c b/usr.bin/id/id.c index 085ef7c41b47..cac3e9018d51 100644 --- a/usr.bin/id/id.c +++ b/usr.bin/id/id.c @@ -379,10 +379,9 @@ who(char *u) void pline(struct passwd *pw) { - u_int rid; if (!pw) { - if ((pw = getpwuid(rid = getuid())) == NULL) + if ((pw = getpwuid(getuid())) == NULL) err(1, "getpwuid"); } diff --git a/usr.bin/nl/nl.c b/usr.bin/nl/nl.c index 662ce268aa94..f557185003d1 100644 --- a/usr.bin/nl/nl.c +++ b/usr.bin/nl/nl.c @@ -144,7 +144,7 @@ main(argc, argv) int argc; char *argv[]; { - int c, n; + int c; long val; unsigned long uval; char *ep; diff --git a/usr.bin/sed/process.c b/usr.bin/sed/process.c index 918e22c93414..ffdb629f9e6a 100644 --- a/usr.bin/sed/process.c +++ b/usr.bin/sed/process.c @@ -92,9 +92,8 @@ process(void) { struct s_command *cp; SPACE tspace; - size_t len, oldpsl = 0; + size_t oldpsl = 0; char *p; - char nc; p = NULL; diff --git a/usr.bin/systat/mbufs.c b/usr.bin/systat/mbufs.c index 1193a3ea77fb..5e55bc9319b0 100644 --- a/usr.bin/systat/mbufs.c +++ b/usr.bin/systat/mbufs.c @@ -168,7 +168,6 @@ showmbufs() int initmbufs() { - int i; size_t len; len = sizeof *mbstat; diff --git a/usr.bin/tr/tr.c b/usr.bin/tr/tr.c index 49325849cd25..61195ff4dbb0 100644 --- a/usr.bin/tr/tr.c +++ b/usr.bin/tr/tr.c @@ -76,7 +76,7 @@ main(int argc, char **argv) struct cset *delete, *squeeze; int n, *p; int Cflag, cflag, dflag, sflag, isstring2; - wint_t ch, cnt, i, lastch; + wint_t ch, cnt, lastch; (void)setlocale(LC_ALL, ""); diff --git a/usr.bin/whereis/whereis.c b/usr.bin/whereis/whereis.c index c212e280b59e..70feb8a3eaaa 100644 --- a/usr.bin/whereis/whereis.c +++ b/usr.bin/whereis/whereis.c @@ -102,10 +102,9 @@ usage(void) void scanopts(int argc, char **argv) { - int c, i, opt_f; + int c, i; ccharp **dirlist; - opt_f = 0; while ((c = getopt(argc, argv, "BMSabfmqsux")) != -1) switch (c) { case 'B':