error: use separate tokens for characters, integers and pointers
Assisted by lint's queries 10, 14, 15. No binary change.
This commit is contained in:
parent
382be5b529
commit
55512687bb
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: filter.c,v 1.19 2023/08/26 12:43:28 rillig Exp $ */
|
||||
/* $NetBSD: filter.c,v 1.20 2023/08/26 14:59:44 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
|
@ -34,7 +34,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)filter.c 8.1 (Berkeley) 6/6/93";
|
||||
#endif
|
||||
__RCSID("$NetBSD: filter.c,v 1.19 2023/08/26 12:43:28 rillig Exp $");
|
||||
__RCSID("$NetBSD: filter.c,v 1.20 2023/08/26 14:59:44 rillig Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -52,7 +52,7 @@ static const char *lint_libs[] = {
|
|||
IG_FILE2,
|
||||
IG_FILE3,
|
||||
IG_FILE4,
|
||||
0
|
||||
NULL
|
||||
};
|
||||
|
||||
static int lexsort(const void *, const void *);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: main.c,v 1.25 2023/08/26 14:50:53 rillig Exp $ */
|
||||
/* $NetBSD: main.c,v 1.26 2023/08/26 14:59:44 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
|
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93";
|
||||
#endif
|
||||
__RCSID("$NetBSD: main.c,v 1.25 2023/08/26 14:50:53 rillig Exp $");
|
||||
__RCSID("$NetBSD: main.c,v 1.26 2023/08/26 14:59:44 rillig Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <signal.h>
|
||||
|
@ -88,7 +88,7 @@ int
|
|||
main(int argc, char **argv)
|
||||
{
|
||||
int c;
|
||||
char *ignorename = 0;
|
||||
char *ignorename = NULL;
|
||||
int ed_argc;
|
||||
char **ed_argv; /* return from touchfiles */
|
||||
bool show_errors = false;
|
||||
|
@ -147,7 +147,7 @@ main(int argc, char **argv)
|
|||
}
|
||||
|
||||
if (notouch)
|
||||
suffixlist = 0;
|
||||
suffixlist = NULL;
|
||||
|
||||
|
||||
if ((queryfile = fopen(im_on, "r")) == NULL) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pi.c,v 1.22 2023/08/26 14:50:53 rillig Exp $ */
|
||||
/* $NetBSD: pi.c,v 1.23 2023/08/26 14:59:44 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
|
@ -34,7 +34,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)pi.c 8.1 (Berkeley) 6/6/93";
|
||||
#endif
|
||||
__RCSID("$NetBSD: pi.c,v 1.22 2023/08/26 14:50:53 rillig Exp $");
|
||||
__RCSID("$NetBSD: pi.c,v 1.23 2023/08/26 14:59:44 rillig Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -144,13 +144,13 @@ static bool piptr(const char *);
|
|||
static const char *Months[] = {
|
||||
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
||||
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
|
||||
0
|
||||
NULL
|
||||
};
|
||||
static const char *Days[] = {
|
||||
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", 0
|
||||
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", NULL
|
||||
};
|
||||
static const char *Piroutines[] = {
|
||||
"program", "function", "procedure", 0
|
||||
"program", "function", "procedure", NULL
|
||||
};
|
||||
|
||||
|
||||
|
@ -416,7 +416,8 @@ pi(void)
|
|||
* End matched %s on line %d
|
||||
* Inserted keyword end matching %s on line %d
|
||||
*/
|
||||
multiple = structured = false;
|
||||
structured = false;
|
||||
multiple = false;
|
||||
if (
|
||||
(cur_wordc == 6 && wordvcmp(cur_wordv+1, 2, pi_Endmatched) == 0)
|
||||
|| (cur_wordc == 8 && wordvcmp(cur_wordv+1, 4, pi_Inserted) == 0)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: subr.c,v 1.23 2023/08/26 14:50:53 rillig Exp $ */
|
||||
/* $NetBSD: subr.c,v 1.24 2023/08/26 14:59:44 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
|
@ -34,7 +34,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)subr.c 8.1 (Berkeley) 6/6/93";
|
||||
#endif
|
||||
__RCSID("$NetBSD: subr.c,v 1.23 2023/08/26 14:50:53 rillig Exp $");
|
||||
__RCSID("$NetBSD: subr.c,v 1.24 2023/08/26 14:59:44 rillig Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <ctype.h>
|
||||
|
@ -266,7 +266,7 @@ struct lang_desc lang_table[] = {
|
|||
{ /*INRI 17*/ "ri", riincomment, rioutcomment },
|
||||
{ /*INTROFF 18*/ "troff", troffincomment, troffoutcomment },
|
||||
{ /*INMOD2 19*/ "mod2", mod2incomment, mod2outcomment },
|
||||
{ 0, 0, 0 }
|
||||
{ NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
void
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: touch.c,v 1.31 2023/08/26 14:50:53 rillig Exp $ */
|
||||
/* $NetBSD: touch.c,v 1.32 2023/08/26 14:59:44 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
|
@ -34,7 +34,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)touch.c 8.1 (Berkeley) 6/6/93";
|
||||
#endif
|
||||
__RCSID("$NetBSD: touch.c,v 1.31 2023/08/26 14:50:53 rillig Exp $");
|
||||
__RCSID("$NetBSD: touch.c,v 1.32 2023/08/26 14:59:44 rillig Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -137,7 +137,8 @@ findfiles(int my_nerrors, Eptr *my_errors, int *r_nfiles, Eptr ***r_files)
|
|||
* for a given file.
|
||||
*/
|
||||
my_files[1] = &my_errors[ei];
|
||||
touchedfiles[0] = touchedfiles[1] = false;
|
||||
touchedfiles[0] = false;
|
||||
touchedfiles[1] = false;
|
||||
name = "\1";
|
||||
fi = 1;
|
||||
ECITERATE(ei, errorp, ei, my_errors, my_nerrors) {
|
||||
|
@ -502,9 +503,10 @@ oktotouch(const char *filename)
|
|||
&& *src == *pat; /* and equal... */
|
||||
src++, pat++)
|
||||
continue;
|
||||
if (*src == 0 && (*pat == 0 || *pat == '.' || *pat == '*'))
|
||||
if (*src == '\0'
|
||||
&& (*pat == '\0' || *pat == '.' || *pat == '*'))
|
||||
return true;
|
||||
if (*src != 0 && *pat == '*')
|
||||
if (*src != '\0' && *pat == '*')
|
||||
return true;
|
||||
while (*pat != '\0' && *pat != '.')
|
||||
pat++;
|
||||
|
@ -553,7 +555,7 @@ execvarg(int n_pissed_on, int *r_argc, char ***r_argv)
|
|||
}
|
||||
if (!terse)
|
||||
fprintf(stdout, "\n");
|
||||
(*r_argv)[n_pissed_on] = 0;
|
||||
(*r_argv)[n_pissed_on] = NULL;
|
||||
}
|
||||
|
||||
static FILE *o_touchedfile; /* the old file */
|
||||
|
|
Loading…
Reference in New Issue