diff --git a/lib/libc/gen/nlist.c b/lib/libc/gen/nlist.c index 9e6d52fc8929..612576257569 100644 --- a/lib/libc/gen/nlist.c +++ b/lib/libc/gen/nlist.c @@ -251,7 +251,6 @@ __elf_fdnlist(fd, list) Elf_Ehdr ehdr; char *strtab = NULL; Elf_Shdr *shdr = NULL; - Elf_Shdr *sh; Elf_Word shdr_size; void *base; struct stat st; diff --git a/lib/libc/locale/utf8.c b/lib/libc/locale/utf8.c index 590bd4334c01..c22d3d6750de 100644 --- a/lib/libc/locale/utf8.c +++ b/lib/libc/locale/utf8.c @@ -50,7 +50,7 @@ _UTF8_init(_RuneLocale *rl) rune_t _UTF8_sgetrune(const char *string, size_t n, const char **result) { - int ch, len, mask, siglen; + int ch, len, mask; rune_t lbound, wch; if (n < 1) { diff --git a/lib/libc/net/ns_name.c b/lib/libc/net/ns_name.c index ae238b0e8353..5422875cc0c6 100644 --- a/lib/libc/net/ns_name.c +++ b/lib/libc/net/ns_name.c @@ -243,7 +243,7 @@ ns_name_unpack(const u_char *msg, const u_char *eom, const u_char *src, { const u_char *srcp, *dstlim; u_char *dstp; - int n, c, len, checked; + int n, len, checked; len = -1; checked = 0; diff --git a/lib/libc/net/ns_ttl.c b/lib/libc/net/ns_ttl.c index 1ad4cafb19c8..79083b2e618c 100644 --- a/lib/libc/net/ns_ttl.c +++ b/lib/libc/net/ns_ttl.c @@ -43,7 +43,7 @@ int ns_format_ttl(u_long src, char *dst, size_t dstlen) { char *odst = dst; int secs, mins, hours, days, weeks, x; - char tmp[50], *p; + char *p; secs = src % 60; src /= 60; mins = src % 60; src /= 60; diff --git a/lib/libc/net/rcmd.c b/lib/libc/net/rcmd.c index fea38879ab9f..fcdd639dfa80 100644 --- a/lib/libc/net/rcmd.c +++ b/lib/libc/net/rcmd.c @@ -344,7 +344,7 @@ int rresvport_af(alport, family) int *alport, family; { - int i, s, len, err; + int s; struct sockaddr_storage ss; u_short *sport; @@ -609,7 +609,6 @@ __ivaliduser_sa(hostf, raddr, salen, luser, ruser) char hname[MAXHOSTNAMELEN]; /* Presumed guilty until proven innocent. */ int userok = 0, hostok = 0; - int h_error; #ifdef YP char *ypdomain; diff --git a/lib/libc/net/res_debug.c b/lib/libc/net/res_debug.c index 22805aca626e..3481419b5ab1 100644 --- a/lib/libc/net/res_debug.c +++ b/lib/libc/net/res_debug.c @@ -205,7 +205,7 @@ fp_query(const u_char *msg, FILE *file) { void fp_nquery(const u_char *msg, int len, FILE *file) { ns_msg handle; - int n, qdcount, ancount, nscount, arcount; + int qdcount, ancount, nscount, arcount; u_int opcode, rcode, id; if ((_res.options & RES_INIT) == 0 && res_init() == -1) diff --git a/lib/libc/net/res_mkupdate.c b/lib/libc/net/res_mkupdate.c index 6e0807d3bc27..67513389de30 100644 --- a/lib/libc/net/res_mkupdate.c +++ b/lib/libc/net/res_mkupdate.c @@ -62,9 +62,9 @@ int res_mkupdate(ns_updrec *rrecp_in, u_char *buf, int buflen) { ns_updrec *rrecp_start = rrecp_in; HEADER *hp; - u_char c, *cp, *cp1, *sp1, *sp2, *startp, *endp; - int n, i, j, found, soanum, multiline; - ns_updrec *rrecp, *tmprrecp, *recptr = NULL; + u_char *cp, *sp1, *sp2, *startp, *endp; + int n, i, soanum, multiline; + ns_updrec *rrecp; struct in_addr ina; char buf2[MAXDNAME]; int section, numrrs = 0, counts[ns_s_max]; @@ -348,7 +348,6 @@ static int getnum_str(u_char **startpp, u_char *endp) { int c, n; int seendigit = 0; - int seendecimal = 0; int m = 0; for (n = 0; *startpp <= endp; ) { diff --git a/lib/libc/posix1e/mac.c b/lib/libc/posix1e/mac.c index ebea67b1881c..3c08e47fef22 100644 --- a/lib/libc/posix1e/mac.c +++ b/lib/libc/posix1e/mac.c @@ -97,9 +97,7 @@ mac_init_internal(void) return (0); while (fgets(line, LINE_MAX, file)) { - char *argv[ARG_MAX]; - char *arg, *parse, *statement, *policyname, *modulename; - int argc; + char *arg, *parse, *statement; if (line[strlen(line)-1] == '\n') line[strlen(line)-1] = '\0'; @@ -206,7 +204,6 @@ mac_reload(void) int mac_free(struct mac *mac) { - int error; if (mac->m_string != NULL) free(mac->m_string); @@ -218,9 +215,6 @@ mac_free(struct mac *mac) int mac_from_text(struct mac **mac, const char *text) { - struct mac *temp; - char *dup, *element, *search; - int count, error; *mac = (struct mac *) malloc(sizeof(**mac)); if (*mac == NULL) @@ -251,7 +245,6 @@ mac_to_text(struct mac *mac, char **text) int mac_prepare(struct mac **mac, char *elements) { - struct mac *temp; if (strlen(elements) >= MAC_MAX_LABEL_BUF_LEN) return (EINVAL);