*BSD News Article 37096


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!yarrina.connect.com.au!warrane.connect.com.au!troll.apana.org.au!rivendell.apana.org.au!not-for-mail
From: phil@rivendell.apana.org.au (Phil Homewood)
Newsgroups: comp.os.386bsd.questions
Subject: Re: gets() warning?
Date: 19 Oct 1994 20:08:40 +1000
Organization: Rivendell - APANA Brisbane.
Lines: 16
Message-ID: <382r78$rsr@rivendell.apana.org.au>
References: <37me3a$efl@jpunix.com>
NNTP-Posting-Host: rivendell.apana.org.au
X-Newsreader: TIN [version 1.2 PL2]

John A. Perry (perry@jpunix.com) wrote:

: 	I have several applications that use the gets() function. I'm sure
: as everyone is aware, every time gets is called, it displays an error
: message "warning: this program uses gets(), which is unsafe." After seeing
: it literally hundreds of times, I'm getting tired of seeing it and it
: makes the application look tacky. Is there anyway to suppress this
: message? 

Yes - use fgets() instead. Why use an unsafe call?

Phil.
--
Phil Homewood                           phil@rivendell.apana.org.au
APANA Brisbane Regional Co-Ordinator    brisbane@apana.org.au
          "Oh my God, there's an axe in my head!"