OSEC

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

From: Leonardo Chiquitto Filho (leonardoiken.com.br)
Date: Mon Oct 03 2005 - 09:42:42 CDT


On Mon, Oct 03, 2005 at 07:41:22AM +0200, Marc Espie wrote:
> On Sun, Oct 02, 2005 at 08:42:33PM -0400, Leonardo Chiquitto Filho wrote:
> > 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"
> ...
>
> what problem does this solve ?
> All I see is that it makes libc take longer to compile.

It just removes warnings like these:
asprintf.c: In function `asprintf':
asprintf.c:34: warning: implicit declaration of function `memset'

I admit this is not a 'problem', but I think preventing this kind
of warnings contributes to the overall source code correctness.

Please tell me if I'm running in the wrong direction, and thanks for
the quick reply :)

- Leonardo

PS. Just verified that FreeBSD does include string.h directly in local.h.