OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
[patch] libc - missing headers and unused vars

From: Leonardo Chiquitto Filho (leonardoiken.com.br)
Date: Sun Oct 02 2005 - 19:42:33 CDT


Index: stdio/asprintf.c
===================================================================
RCS file: /cvs/src/lib/libc/stdio/asprintf.c,v
retrieving revision 1.14
diff -u -r1.14 asprintf.c
--- stdio/asprintf.c 8 Aug 2005 08:05:36 -0000 1.14
+++ stdio/asprintf.c 1 Oct 2005 03:14:22 -0000
-18,6 +18,7
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <errno.h>
 #include <stdarg.h>
 #include "local.h"
Index: stdio/snprintf.c
===================================================================
RCS file: /cvs/src/lib/libc/stdio/snprintf.c,v
retrieving revision 1.13
diff -u -r1.13 snprintf.c
--- stdio/snprintf.c 8 Aug 2005 08:05:36 -0000 1.13
+++ stdio/snprintf.c 1 Oct 2005 03:14:23 -0000
-33,6 +33,7
 
 #include <limits.h>
 #include <stdio.h>
+#include <string.h>
 #include <stdarg.h>
 #include "local.h"
 
Index: stdio/sprintf.c
===================================================================
RCS file: /cvs/src/lib/libc/stdio/sprintf.c,v
retrieving revision 1.12
diff -u -r1.12 sprintf.c
--- stdio/sprintf.c 8 Aug 2005 08:05:36 -0000 1.12
+++ stdio/sprintf.c 1 Oct 2005 03:14:23 -0000
-32,6 +32,7
  */
 
 #include <stdio.h>
+#include <string.h>
 #include <stdarg.h>
 #include <limits.h>
 #include "local.h"
Index: stdio/tmpfile.c
===================================================================
RCS file: /cvs/src/lib/libc/stdio/tmpfile.c,v
retrieving revision 1.9
diff -u -r1.9 tmpfile.c
--- stdio/tmpfile.c 8 Aug 2005 08:05:36 -0000 1.9
+++ stdio/tmpfile.c 1 Oct 2005 03:14:23 -0000
-37,6 +37,7
 #include <signal.h>
 #include <errno.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 #include <paths.h>
 
Index: stdio/vasprintf.c
===================================================================
RCS file: /cvs/src/lib/libc/stdio/vasprintf.c,v
retrieving revision 1.11
diff -u -r1.11 vasprintf.c
--- stdio/vasprintf.c 8 Aug 2005 08:05:36 -0000 1.11
+++ stdio/vasprintf.c 1 Oct 2005 03:14:23 -0000
-18,6 +18,7
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <errno.h>
 #include "local.h"
 
Index: stdio/vsnprintf.c
===================================================================
RCS file: /cvs/src/lib/libc/stdio/vsnprintf.c,v
retrieving revision 1.10
diff -u -r1.10 vsnprintf.c
--- stdio/vsnprintf.c 8 Aug 2005 08:05:36 -0000 1.10
+++ stdio/vsnprintf.c 1 Oct 2005 03:14:23 -0000
-33,6 +33,7
 
 #include <limits.h>
 #include <stdio.h>
+#include <string.h>
 #include "local.h"
 
 int
Index: stdio/vsprintf.c
===================================================================
RCS file: /cvs/src/lib/libc/stdio/vsprintf.c,v
retrieving revision 1.11
diff -u -r1.11 vsprintf.c
--- stdio/vsprintf.c 8 Aug 2005 08:05:36 -0000 1.11
+++ stdio/vsprintf.c 1 Oct 2005 03:14:23 -0000
-32,6 +32,7
  */
 
 #include <stdio.h>
+#include <string.h>
 #include <limits.h>
 #include "local.h"
 
Index: stdlib/malloc.c
===================================================================
RCS file: /cvs/src/lib/libc/stdlib/malloc.c,v
retrieving revision 1.76
diff -u -r1.76 malloc.c
--- stdlib/malloc.c 8 Aug 2005 08:05:36 -0000 1.76
+++ stdlib/malloc.c 1 Oct 2005 03:14:24 -0000
-47,6 +47,7
 #include <fcntl.h>
 #include <limits.h>
 #include <errno.h>
+#include <err.h>
 
 #include "thread_private.h"

Index: rpc/svc_tcp.c
===================================================================
RCS file: /cvs/src/lib/libc/rpc/svc_tcp.c,v
retrieving revision 1.26
diff -u -r1.26 svc_tcp.c
--- rpc/svc_tcp.c 8 Aug 2005 08:05:35 -0000 1.26
+++ rpc/svc_tcp.c 1 Oct 2005 02:49:37 -0000
-343,7 +343,6
         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)
Index: stdlib/malloc.c
===================================================================
RCS file: /cvs/src/lib/libc/stdlib/malloc.c,v
retrieving revision 1.76
diff -u -r1.76 malloc.c
--- stdlib/malloc.c 8 Aug 2005 08:05:36 -0000 1.76
+++ stdlib/malloc.c 1 Oct 2005 02:49:39 -0000
-690,14 +690,12
 {
     void *p, *delay_free = NULL;
     int i;
- struct rlimit rl;
     struct pginfo **pd;
     struct pdinfo *pi;
     u_long pidx;
     void *tp;
     struct pgfree *pf;
     u_long index;
- int m;
 
     size = pageround(size) + malloc_guard;