WARNS=2 fix, use __FBSDID().
Not added to Makefile as WARNS=2 will be made default.
This commit is contained in:
parent
8b56c58be4
commit
075f293932
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=87675
@ -31,13 +31,13 @@
|
|||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
|
||||||
|
__FBSDID("$FreeBSD$");
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
#if 0
|
static const char sccsid[] = "@(#)ttymsg.c 8.2 (Berkeley) 11/16/93";
|
||||||
static char sccsid[] = "@(#)ttymsg.c 8.2 (Berkeley) 11/16/93";
|
|
||||||
#endif
|
#endif
|
||||||
static const char rcsid[] =
|
|
||||||
"$FreeBSD$";
|
|
||||||
#endif /* not lint */
|
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/uio.h>
|
#include <sys/uio.h>
|
||||||
|
@ -31,19 +31,19 @@
|
|||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
|
||||||
|
__FBSDID("$FreeBSD$");
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static const char copyright[] =
|
static const char copyright[] =
|
||||||
"@(#) Copyright (c) 1988, 1990, 1993\n\
|
"@(#) Copyright (c) 1988, 1990, 1993\n\
|
||||||
The Regents of the University of California. All rights reserved.\n";
|
The Regents of the University of California. All rights reserved.\n";
|
||||||
#endif /* not lint */
|
#endif
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
#if 0
|
static const char sccsid[] = "@(#)wall.c 8.2 (Berkeley) 11/16/93";
|
||||||
static char sccsid[] = "@(#)wall.c 8.2 (Berkeley) 11/16/93";
|
|
||||||
#endif
|
#endif
|
||||||
static const char rcsid[] =
|
|
||||||
"$FreeBSD$";
|
|
||||||
#endif /* not lint */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This program is not related to David Wall, whose Stanford Ph.D. thesis
|
* This program is not related to David Wall, whose Stanford Ph.D. thesis
|
||||||
@ -150,7 +150,7 @@ main(int argc, char *argv[])
|
|||||||
if (!pw)
|
if (!pw)
|
||||||
continue;
|
continue;
|
||||||
for (g = grouplist; g && ingroup == 0; g = g->next) {
|
for (g = grouplist; g && ingroup == 0; g = g->next) {
|
||||||
if (g->gid == -1)
|
if (g->gid == (gid_t)-1)
|
||||||
continue;
|
continue;
|
||||||
if (g->gid == pw->pw_gid)
|
if (g->gid == pw->pw_gid)
|
||||||
ingroup = 1;
|
ingroup = 1;
|
||||||
@ -192,7 +192,8 @@ makemsg(char *fname)
|
|||||||
time_t now;
|
time_t now;
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
int fd;
|
int fd;
|
||||||
char *p, *tty, hostname[MAXHOSTNAMELEN], lbuf[256], tmpname[64];
|
char *p, hostname[MAXHOSTNAMELEN], lbuf[256], tmpname[64];
|
||||||
|
const char *tty;
|
||||||
const char *whom;
|
const char *whom;
|
||||||
gid_t egid;
|
gid_t egid;
|
||||||
|
|
||||||
@ -290,7 +291,7 @@ makemsg(char *fname)
|
|||||||
mbufsize = sbuf.st_size;
|
mbufsize = sbuf.st_size;
|
||||||
if (!(mbuf = malloc((u_int)mbufsize)))
|
if (!(mbuf = malloc((u_int)mbufsize)))
|
||||||
err(1, "out of memory");
|
err(1, "out of memory");
|
||||||
if (fread(mbuf, sizeof(*mbuf), mbufsize, fp) != mbufsize)
|
if ((int)fread(mbuf, sizeof(*mbuf), mbufsize, fp) != mbufsize)
|
||||||
err(1, "can't read temporary file");
|
err(1, "can't read temporary file");
|
||||||
(void)close(fd);
|
(void)close(fd);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user