diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2005-10-10 12:00:53 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2005-10-10 12:00:53 +0000 |
commit | b7c7fc0bd7b2a8590867c5e3060bfae9606020c7 (patch) | |
tree | e95d96f84b77b03a8e4ae6b3ebc772329ae7f3d0 /lib | |
parent | 39528b504c0ce66fdd1d03b71ff3b0f9f3fd1eb0 (diff) |
Remove a few warnings. Those were not apparent thanks to a bug in gcc 2.95.
Patch by Leonardo Chiquitto Filho <leonardo@iken.com.br>
Thanks.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/rpc/svc_tcp.c | 3 | ||||
-rw-r--r-- | lib/libc/stdio/asprintf.c | 3 | ||||
-rw-r--r-- | lib/libc/stdio/snprintf.c | 3 | ||||
-rw-r--r-- | lib/libc/stdio/sprintf.c | 3 | ||||
-rw-r--r-- | lib/libc/stdio/tmpfile.c | 3 | ||||
-rw-r--r-- | lib/libc/stdio/vasprintf.c | 3 | ||||
-rw-r--r-- | lib/libc/stdio/vsnprintf.c | 3 | ||||
-rw-r--r-- | lib/libc/stdio/vsprintf.c | 3 | ||||
-rw-r--r-- | lib/libc/stdlib/malloc.c | 6 |
9 files changed, 18 insertions, 12 deletions
diff --git a/lib/libc/rpc/svc_tcp.c b/lib/libc/rpc/svc_tcp.c index 620606d0e17..bb999374b0e 100644 --- a/lib/libc/rpc/svc_tcp.c +++ b/lib/libc/rpc/svc_tcp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: svc_tcp.c,v 1.26 2005/08/08 08:05:35 espie Exp $ */ +/* $OpenBSD: svc_tcp.c,v 1.27 2005/10/10 12:00:52 espie Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for * unrestricted use provided that this legend is included on all tape @@ -343,7 +343,6 @@ readtcp(SVCXPRT *xprt, caddr_t buf, int len) struct timeval start; struct timeval tmp1, tmp2; struct pollfd *pfd = NULL; - int prevbytes = 0, bytes; pfd = (struct pollfd *)malloc(sizeof(*pfd) * (svc_max_pollfd + 1)); if (pfd == NULL) diff --git a/lib/libc/stdio/asprintf.c b/lib/libc/stdio/asprintf.c index 7de0bc52ce0..de6404ecb4f 100644 --- a/lib/libc/stdio/asprintf.c +++ b/lib/libc/stdio/asprintf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: asprintf.c,v 1.14 2005/08/08 08:05:36 espie Exp $ */ +/* $OpenBSD: asprintf.c,v 1.15 2005/10/10 12:00:52 espie Exp $ */ /* * Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com> @@ -18,6 +18,7 @@ #include <stdio.h> #include <stdlib.h> +#include <string.h> #include <errno.h> #include <stdarg.h> #include "local.h" diff --git a/lib/libc/stdio/snprintf.c b/lib/libc/stdio/snprintf.c index 5f0a7349fc8..45ef7eb676a 100644 --- a/lib/libc/stdio/snprintf.c +++ b/lib/libc/stdio/snprintf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: snprintf.c,v 1.13 2005/08/08 08:05:36 espie Exp $ */ +/* $OpenBSD: snprintf.c,v 1.14 2005/10/10 12:00:52 espie Exp $ */ /*- * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. @@ -33,6 +33,7 @@ #include <limits.h> #include <stdio.h> +#include <string.h> #include <stdarg.h> #include "local.h" diff --git a/lib/libc/stdio/sprintf.c b/lib/libc/stdio/sprintf.c index a31246c91db..67f924b27e8 100644 --- a/lib/libc/stdio/sprintf.c +++ b/lib/libc/stdio/sprintf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sprintf.c,v 1.12 2005/08/08 08:05:36 espie Exp $ */ +/* $OpenBSD: sprintf.c,v 1.13 2005/10/10 12:00:52 espie Exp $ */ /*- * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. @@ -32,6 +32,7 @@ */ #include <stdio.h> +#include <string.h> #include <stdarg.h> #include <limits.h> #include "local.h" diff --git a/lib/libc/stdio/tmpfile.c b/lib/libc/stdio/tmpfile.c index 8a1b7fb0628..39f7e929a1a 100644 --- a/lib/libc/stdio/tmpfile.c +++ b/lib/libc/stdio/tmpfile.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tmpfile.c,v 1.9 2005/08/08 08:05:36 espie Exp $ */ +/* $OpenBSD: tmpfile.c,v 1.10 2005/10/10 12:00:52 espie Exp $ */ /*- * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. @@ -37,6 +37,7 @@ #include <signal.h> #include <errno.h> #include <stdio.h> +#include <stdlib.h> #include <string.h> #include <paths.h> diff --git a/lib/libc/stdio/vasprintf.c b/lib/libc/stdio/vasprintf.c index 77114bb1d1b..7b56e507fbb 100644 --- a/lib/libc/stdio/vasprintf.c +++ b/lib/libc/stdio/vasprintf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vasprintf.c,v 1.11 2005/08/08 08:05:36 espie Exp $ */ +/* $OpenBSD: vasprintf.c,v 1.12 2005/10/10 12:00:52 espie Exp $ */ /* * Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com> @@ -18,6 +18,7 @@ #include <stdio.h> #include <stdlib.h> +#include <string.h> #include <errno.h> #include "local.h" diff --git a/lib/libc/stdio/vsnprintf.c b/lib/libc/stdio/vsnprintf.c index d9fb7f8872c..9064571c4d7 100644 --- a/lib/libc/stdio/vsnprintf.c +++ b/lib/libc/stdio/vsnprintf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vsnprintf.c,v 1.10 2005/08/08 08:05:36 espie Exp $ */ +/* $OpenBSD: vsnprintf.c,v 1.11 2005/10/10 12:00:52 espie Exp $ */ /*- * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. @@ -33,6 +33,7 @@ #include <limits.h> #include <stdio.h> +#include <string.h> #include "local.h" int diff --git a/lib/libc/stdio/vsprintf.c b/lib/libc/stdio/vsprintf.c index 91462fe1551..0e3be8d7427 100644 --- a/lib/libc/stdio/vsprintf.c +++ b/lib/libc/stdio/vsprintf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vsprintf.c,v 1.11 2005/08/08 08:05:36 espie Exp $ */ +/* $OpenBSD: vsprintf.c,v 1.12 2005/10/10 12:00:52 espie Exp $ */ /*- * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. @@ -32,6 +32,7 @@ */ #include <stdio.h> +#include <string.h> #include <limits.h> #include "local.h" diff --git a/lib/libc/stdlib/malloc.c b/lib/libc/stdlib/malloc.c index cb2ba737ae6..a3babab20a4 100644 --- a/lib/libc/stdlib/malloc.c +++ b/lib/libc/stdlib/malloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: malloc.c,v 1.78 2005/10/05 18:38:10 deraadt Exp $ */ +/* $OpenBSD: malloc.c,v 1.79 2005/10/10 12:00:52 espie Exp $ */ /* * ---------------------------------------------------------------------------- @@ -48,6 +48,7 @@ #include <fcntl.h> #include <limits.h> #include <errno.h> +#include <err.h> #include "thread_private.h" @@ -741,8 +742,7 @@ static void * malloc_pages(size_t size) { void *p, *delay_free = NULL, *tp; - int i, m; - struct rlimit rl; + int i; struct pginfo **pd; struct pdinfo *pi; u_long pidx, index; |