mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-19 10:53:58 +00:00
Make a link-time warning for the use of gets().
IMHO, the run-time warning should come out, but I'm not game to start that fight yet... This uses a feature of the gnu linker. Inspired by: NetBSD
This commit is contained in:
parent
7283aacac2
commit
216b9a0d22
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=11185
@ -40,6 +40,9 @@ static char sccsid[] = "@(#)gets.c 8.1 (Berkeley) 6/4/93";
|
||||
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__warn_references(gets, "warning: this program uses gets(), which is unsafe.");
|
||||
|
||||
char *
|
||||
gets(buf)
|
||||
|
Loading…
Reference in New Issue
Block a user