Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Oct 1995 17:29:57 -0600
From:      Nate Williams <nate@rocky.sri.MT.net>
To:        joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch)
Cc:        nate@rocky.sri.MT.net (Nate Williams), peter@freefall.freebsd.org, CVS-commiters@freefall.freebsd.org, cvs-lib@freefall.freebsd.org
Subject:   Re: cvs commit: src/lib/libc/stdio gets.c
Message-ID:  <199510042329.RAA05253@rocky.sri.MT.net>
In-Reply-To: <199510042241.XAA04988@uriah.heep.sax.de>
References:  <199510041853.MAA04484@rocky.sri.MT.net> <199510042241.XAA04988@uriah.heep.sax.de>

next in thread | previous in thread | raw e-mail | index | archive | help
J. Wunsch writes:
> As Nate Williams wrote:
> > 
> > ...  If you also want to take some more
> > inspiration from NetBSD, add a static variable to the sources so the
> > warning is printed at run-time only once.  It is still annoying, but not
> > continually annoying.
> 
> huh?  This has been there all the time:
> 
>         static int warned;
>         static char w[] =
>             "warning: this program uses gets(), which is unsafe.\r\n";
> 
>         if (!warned) {
>                 (void) write(STDERR_FILENO, w, sizeof(w) - 1);
>                 warned = 1;
>         }
>  

Whoops. Colod me red-faced.  I'll go back and slink into my corner.


Nate



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199510042329.RAA05253>