Functions declared as <type> <identifier>(<nil>) should be declared as

<type> <identifier>(<void-type>) in ANSI C.
This commit is contained in:
Juli Mallett 2002-07-14 02:03:23 +00:00
parent 7b6f658ced
commit d1fea89cae
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=99939
5 changed files with 27 additions and 27 deletions

View File

@ -168,7 +168,7 @@ expr(const char *expbuf)
* query : lor | lor '?' query ':' query
*/
static int
query()
query(void)
{
int result, true_val, false_val;
@ -190,7 +190,7 @@ query()
* lor : land { '||' land }
*/
static int
lor()
lor(void)
{
int c, vl, vr;
@ -210,7 +210,7 @@ lor()
* land : not { '&&' not }
*/
static int
land()
land(void)
{
int c, vl, vr;
@ -230,7 +230,7 @@ land()
* not : eqrel | '!' not
*/
static int
not()
not(void)
{
int val, c;
@ -250,7 +250,7 @@ not()
* eqrel : shift { eqrelop shift }
*/
static int
eqrel()
eqrel(void)
{
int vl, vr, op;
@ -288,7 +288,7 @@ eqrel()
* shift : primary { shop primary }
*/
static int
shift()
shift(void)
{
int vl, vr, c;
@ -312,7 +312,7 @@ shift()
* primary : term { addop term }
*/
static int
primary()
primary(void)
{
int c, vl, vr;
@ -334,7 +334,7 @@ primary()
* <term> := <exp> { <mulop> <exp> }
*/
static int
term()
term(void)
{
int c, vl, vr;
@ -368,7 +368,7 @@ term()
* <term> := <unary> { <expop> <unary> }
*/
static int
exp()
exp(void)
{
int c, vl, vr, n;
@ -397,7 +397,7 @@ exp()
* unary : factor | unop unary
*/
static int
unary()
unary(void)
{
int val, c;
@ -422,7 +422,7 @@ unary()
* factor : constant | '(' query ')'
*/
static int
factor()
factor(void)
{
int val;
@ -442,7 +442,7 @@ factor()
* Note: constant() handles multi-byte constants
*/
static int
constant()
constant(void)
{
int i;
int value;
@ -503,7 +503,7 @@ constant()
* num : digit | num digit
*/
static int
num()
num(void)
{
int rval, c, base;
int ndig;
@ -561,7 +561,7 @@ num()
* eqrel : '=' | '==' | '!=' | '<' | '>' | '<=' | '>='
*/
static int
geteqrel()
geteqrel(void)
{
int c1, c2;
@ -605,7 +605,7 @@ geteqrel()
* Skip over any white space and return terminating char.
*/
static int
skipws()
skipws(void)
{
int c;

View File

@ -100,7 +100,7 @@ addtoincludepath(const char *dirname)
}
static void
ensure_m4path()
ensure_m4path(void)
{
static int envpathdone = 0;
char *envpath;
@ -236,7 +236,7 @@ addchar(int c)
}
static char *
getstring()
getstring(void)
{
addchar('\0');
current = 0;

View File

@ -324,7 +324,7 @@ do_look_ahead(int t, const char *token)
* macro - the work horse..
*/
static void
macro()
macro(void)
{
char token[MAXTOK+1];
int t, l;
@ -566,7 +566,7 @@ inspect(int c, char *tp)
* within keywrds block.
*/
static void
initkwds()
initkwds(void)
{
size_t i;
unsigned int h;
@ -635,7 +635,7 @@ dump_stack(struct position *t, int lev)
static void
enlarge_stack()
enlarge_stack(void)
{
STACKMAX *= 2;
mstack = realloc(mstack, sizeof(stae) * STACKMAX);

View File

@ -152,7 +152,7 @@ pbunsigned(unsigned long n)
}
void
initspaces()
initspaces(void)
{
int i;
@ -168,7 +168,7 @@ initspaces()
}
void
enlarge_strspace()
enlarge_strspace(void)
{
char *newstrspace;
int i;
@ -189,7 +189,7 @@ enlarge_strspace()
}
void
enlarge_bufspace()
enlarge_bufspace(void)
{
char *newbuf;
int i;
@ -246,7 +246,7 @@ onintr(int signo __unused)
* killdiv - get rid of the diversion files
*/
void
killdiv()
killdiv(void)
{
int n;
@ -291,7 +291,7 @@ xstrdup(const char *s)
}
void
usage()
usage(void)
{
fprintf(stderr,
"usage: m4 [-d flags] [-t name] [-gs] [-D name[=value]]...\n"
@ -351,7 +351,7 @@ doprintfilename(struct input_file *f)
* and later dump everything that was added since then to a file.
*/
size_t
buffer_mark()
buffer_mark(void)
{
return bp - buf;
}

View File

@ -188,7 +188,7 @@ set_trace_flags(const char *s)
}
static int
frame_level()
frame_level(void)
{
int level;
int framep;