1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-30 08:19:09 +00:00

WARNS=2 fix, use __FBSDID().

Not added to Makefile as WARNS=2 will be made default.
This commit is contained in:
Mark Murray 2001-12-11 22:22:15 +00:00
parent 8b56c58be4
commit 075f293932
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=87675
2 changed files with 15 additions and 14 deletions

View File

@ -31,13 +31,13 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#ifndef lint
#if 0
static char sccsid[] = "@(#)ttymsg.c 8.2 (Berkeley) 11/16/93";
static const char sccsid[] = "@(#)ttymsg.c 8.2 (Berkeley) 11/16/93";
#endif
static const char rcsid[] =
"$FreeBSD$";
#endif /* not lint */
#include <sys/types.h>
#include <sys/uio.h>

View File

@ -31,19 +31,19 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#ifndef lint
static const char copyright[] =
"@(#) Copyright (c) 1988, 1990, 1993\n\
The Regents of the University of California. All rights reserved.\n";
#endif /* not lint */
#endif
#ifndef lint
#if 0
static char sccsid[] = "@(#)wall.c 8.2 (Berkeley) 11/16/93";
static const char sccsid[] = "@(#)wall.c 8.2 (Berkeley) 11/16/93";
#endif
static const char rcsid[] =
"$FreeBSD$";
#endif /* not lint */
/*
* This program is not related to David Wall, whose Stanford Ph.D. thesis
@ -150,7 +150,7 @@ main(int argc, char *argv[])
if (!pw)
continue;
for (g = grouplist; g && ingroup == 0; g = g->next) {
if (g->gid == -1)
if (g->gid == (gid_t)-1)
continue;
if (g->gid == pw->pw_gid)
ingroup = 1;
@ -192,7 +192,8 @@ makemsg(char *fname)
time_t now;
FILE *fp;
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;
gid_t egid;
@ -290,7 +291,7 @@ makemsg(char *fname)
mbufsize = sbuf.st_size;
if (!(mbuf = malloc((u_int)mbufsize)))
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");
(void)close(fd);
}