WARNS=2 partial fix; use NO_WERROR to protect against some hard-to-fix warnings.
Use __FBSDID(), kill register keyword.
This commit is contained in:
parent
f1d37c20c0
commit
e74bf75f1c
@ -1,7 +1,9 @@
|
||||
# @(#)Makefile 8.1 (Berkeley) 6/6/93
|
||||
# $FreeBSD$
|
||||
|
||||
PROG= sed
|
||||
CFLAGS+=-Wall
|
||||
SRCS= compile.c main.c misc.c process.c
|
||||
|
||||
NO_WERROR=yes
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
@ -35,13 +35,12 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)compile.c 8.1 (Berkeley) 6/6/93";
|
||||
static const char sccsid[] = "@(#)compile.c 8.1 (Berkeley) 6/6/93";
|
||||
#endif
|
||||
static const char rcsid[] =
|
||||
"$FreeBSD$";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
@ -77,7 +76,7 @@ static char *compile_text __P((void));
|
||||
static char *compile_tr __P((char *, char **));
|
||||
static struct s_command
|
||||
**compile_stream __P((struct s_command **));
|
||||
static char *duptoeol __P((char *, char *));
|
||||
static char *duptoeol __P((char *, const char *));
|
||||
static void enterlabel __P((struct s_command *));
|
||||
static struct s_command
|
||||
*findlabel __P((char *));
|
||||
@ -157,7 +156,7 @@ static struct s_command **
|
||||
compile_stream(link)
|
||||
struct s_command **link;
|
||||
{
|
||||
register char *p;
|
||||
char *p;
|
||||
static char lbuf[_POSIX2_LINE_MAX + 1]; /* To save stack */
|
||||
struct s_command *cmd, *cmd2, *stack;
|
||||
struct s_format *fp;
|
||||
@ -465,7 +464,8 @@ compile_subst(p, s)
|
||||
struct s_subst *s;
|
||||
{
|
||||
static char lbuf[_POSIX2_LINE_MAX + 1];
|
||||
int asize, ref, size;
|
||||
int asize, size;
|
||||
u_char ref;
|
||||
char c, *text, *op, *sp;
|
||||
int more = 0;
|
||||
|
||||
@ -722,8 +722,8 @@ compile_addr(p, a)
|
||||
*/
|
||||
static char *
|
||||
duptoeol(s, ctype)
|
||||
register char *s;
|
||||
char *ctype;
|
||||
char *s;
|
||||
const char *ctype;
|
||||
{
|
||||
size_t len;
|
||||
int ws;
|
||||
@ -784,9 +784,9 @@ static void
|
||||
enterlabel(cp)
|
||||
struct s_command *cp;
|
||||
{
|
||||
register struct labhash **lhp, *lh;
|
||||
register u_char *p;
|
||||
register u_int h, c;
|
||||
struct labhash **lhp, *lh;
|
||||
u_char *p;
|
||||
u_int h, c;
|
||||
|
||||
for (h = 0, p = (u_char *)cp->t; (c = *p) != 0; p++)
|
||||
h = (h << 5) + h + c;
|
||||
@ -811,9 +811,9 @@ static struct s_command *
|
||||
findlabel(name)
|
||||
char *name;
|
||||
{
|
||||
register struct labhash *lh;
|
||||
register u_char *p;
|
||||
register u_int h, c;
|
||||
struct labhash *lh;
|
||||
u_char *p;
|
||||
u_int h, c;
|
||||
|
||||
for (h = 0, p = (u_char *)name; (c = *p) != 0; p++)
|
||||
h = (h << 5) + h + c;
|
||||
@ -833,8 +833,8 @@ findlabel(name)
|
||||
static void
|
||||
uselabel()
|
||||
{
|
||||
register struct labhash *lh, *next;
|
||||
register int i;
|
||||
struct labhash *lh, *next;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < LHSZ; i++) {
|
||||
for (lh = labels[i]; lh != NULL; lh = next) {
|
||||
|
@ -46,7 +46,7 @@ extern u_long linenum;
|
||||
extern int appendnum;
|
||||
extern int lastline;
|
||||
extern int aflag, eflag, nflag;
|
||||
extern char *fname;
|
||||
extern const char *fname;
|
||||
extern int rflags; /* regex flags to use */
|
||||
|
||||
void cfclose __P((struct s_command *, struct s_command *));
|
||||
|
@ -35,19 +35,18 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#ifndef lint
|
||||
static const char copyright[] =
|
||||
"@(#) Copyright (c) 1992, 1993\n\
|
||||
The Regents of the University of California. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
#endif
|
||||
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)main.c 8.2 (Berkeley) 1/3/94";
|
||||
static const char sccsid[] = "@(#)main.c 8.2 (Berkeley) 1/3/94";
|
||||
#endif
|
||||
static const char rcsid[] =
|
||||
"$FreeBSD$";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
@ -101,7 +100,7 @@ int rflags = 0;
|
||||
* Current file and line number; line numbers restart across compilation
|
||||
* units, but span across input files.
|
||||
*/
|
||||
char *fname; /* File name. */
|
||||
const char *fname; /* File name. */
|
||||
u_long linenum;
|
||||
int lastline; /* TRUE on the last line of the last file */
|
||||
|
||||
|
@ -35,13 +35,12 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)misc.c 8.1 (Berkeley) 6/6/93";
|
||||
static const char sccsid[] = "@(#)misc.c 8.1 (Berkeley) 6/6/93";
|
||||
#endif
|
||||
static const char rcsid[] =
|
||||
"$FreeBSD$";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
|
@ -35,13 +35,12 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)process.c 8.6 (Berkeley) 4/20/94";
|
||||
static const char sccsid[] = "@(#)process.c 8.6 (Berkeley) 4/20/94";
|
||||
#endif
|
||||
static const char rcsid[] =
|
||||
"$FreeBSD$";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
@ -459,10 +458,10 @@ flush_appends()
|
||||
|
||||
static void
|
||||
lputs(s)
|
||||
register char *s;
|
||||
char *s;
|
||||
{
|
||||
register int count;
|
||||
register char *escapes, *p;
|
||||
int count;
|
||||
char *escapes, *p;
|
||||
struct winsize win;
|
||||
static int termwidth = -1;
|
||||
|
||||
@ -544,8 +543,8 @@ regsub(sp, string, src)
|
||||
SPACE *sp;
|
||||
char *string, *src;
|
||||
{
|
||||
register int len, no;
|
||||
register char c, *dst;
|
||||
int len, no;
|
||||
char c, *dst;
|
||||
|
||||
#define NEEDSP(reqlen) \
|
||||
if (sp->len >= sp->blen - (reqlen) - 1) { \
|
||||
@ -618,7 +617,7 @@ cspace(sp, p, len, spflag)
|
||||
*/
|
||||
void
|
||||
cfclose(cp, end)
|
||||
register struct s_command *cp, *end;
|
||||
struct s_command *cp, *end;
|
||||
{
|
||||
|
||||
for (; cp != end; cp = cp->next)
|
||||
|
Loading…
Reference in New Issue
Block a user