Use, don't kludge, MAKE_ATTR_UNUSED.

CID 1300234
CID 1300237
CID 1300238
CID 1300245
CID 1300255
CID 1300267
CID 1300284
This commit is contained in:
riastradh 2017-04-16 19:53:58 +00:00
parent 894367af71
commit 9660a1b334
5 changed files with 38 additions and 45 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: dir.c,v 1.69 2017/01/31 06:54:23 sjg Exp $ */
/* $NetBSD: dir.c,v 1.70 2017/04/16 19:53:58 riastradh Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@ -70,14 +70,14 @@
*/
#ifndef MAKE_NATIVE
static char rcsid[] = "$NetBSD: dir.c,v 1.69 2017/01/31 06:54:23 sjg Exp $";
static char rcsid[] = "$NetBSD: dir.c,v 1.70 2017/04/16 19:53:58 riastradh Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)dir.c 8.2 (Berkeley) 1/2/94";
#else
__RCSID("$NetBSD: dir.c,v 1.69 2017/01/31 06:54:23 sjg Exp $");
__RCSID("$NetBSD: dir.c,v 1.70 2017/04/16 19:53:58 riastradh Exp $");
#endif
#endif /* not lint */
#endif
@ -803,11 +803,11 @@ DirExpandInt(const char *word, Lst path, Lst expansions)
*-----------------------------------------------------------------------
*/
static int
DirPrintWord(void *word, void *dummy)
DirPrintWord(void *word, void *dummy MAKE_ATTR_UNUSED)
{
fprintf(debug_file, "%s ", (char *)word);
return(dummy ? 0 : 0);
return 0;
}
/*-
@ -1851,10 +1851,10 @@ Dir_PrintDirectories(void)
}
static int
DirPrintDir(void *p, void *dummy)
DirPrintDir(void *p, void *dummy MAKE_ATTR_UNUSED)
{
fprintf(debug_file, "%s ", ((Path *)p)->name);
return (dummy ? 0 : 0);
return 0;
}
void

View File

@ -1,4 +1,4 @@
/* $NetBSD: parse.c,v 1.218 2017/03/01 16:39:49 sjg Exp $ */
/* $NetBSD: parse.c,v 1.219 2017/04/16 19:53:58 riastradh Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
static char rcsid[] = "$NetBSD: parse.c,v 1.218 2017/03/01 16:39:49 sjg Exp $";
static char rcsid[] = "$NetBSD: parse.c,v 1.219 2017/04/16 19:53:58 riastradh Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94";
#else
__RCSID("$NetBSD: parse.c,v 1.218 2017/03/01 16:39:49 sjg Exp $");
__RCSID("$NetBSD: parse.c,v 1.219 2017/04/16 19:53:58 riastradh Exp $");
#endif
#endif /* not lint */
#endif
@ -1085,15 +1085,15 @@ ParseDoSrc(int tOp, const char *src)
*-----------------------------------------------------------------------
*/
static int
ParseFindMain(void *gnp, void *dummy)
ParseFindMain(void *gnp, void *dummy MAKE_ATTR_UNUSED)
{
GNode *gn = (GNode *)gnp;
if ((gn->type & OP_NOTARGET) == 0) {
mainNode = gn;
Targ_SetMain(gn);
return (dummy ? 1 : 1);
return 1;
} else {
return (dummy ? 0 : 0);
return 0;
}
}
@ -1131,10 +1131,10 @@ ParseAddDir(void *path, void *name)
*-----------------------------------------------------------------------
*/
static int
ParseClearPath(void *path, void *dummy)
ParseClearPath(void *path, void *dummy MAKE_ATTR_UNUSED)
{
Dir_ClearPath((Lst) path);
return(dummy ? 0 : 0);
return 0;
}
/*-

View File

@ -1,4 +1,4 @@
/* $NetBSD: suff.c,v 1.84 2016/06/30 05:34:04 dholland Exp $ */
/* $NetBSD: suff.c,v 1.85 2017/04/16 19:53:58 riastradh Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
static char rcsid[] = "$NetBSD: suff.c,v 1.84 2016/06/30 05:34:04 dholland Exp $";
static char rcsid[] = "$NetBSD: suff.c,v 1.85 2017/04/16 19:53:58 riastradh Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)suff.c 8.4 (Berkeley) 3/21/94";
#else
__RCSID("$NetBSD: suff.c,v 1.84 2016/06/30 05:34:04 dholland Exp $");
__RCSID("$NetBSD: suff.c,v 1.85 2017/04/16 19:53:58 riastradh Exp $");
#endif
#endif /* not lint */
#endif
@ -762,12 +762,10 @@ Suff_AddTransform(char *line)
*-----------------------------------------------------------------------
*/
int
Suff_EndTransform(void *gnp, void *dummy)
Suff_EndTransform(void *gnp, void *dummy MAKE_ATTR_UNUSED)
{
GNode *gn = (GNode *)gnp;
(void)dummy;
if ((gn->type & OP_DOUBLEDEP) && !Lst_IsEmpty (gn->cohorts))
gn = (GNode *)Lst_Datum(Lst_Last(gn->cohorts));
if ((gn->type & OP_TRANSFORM) && Lst_IsEmpty(gn->commands) &&
@ -2597,23 +2595,20 @@ Suff_End(void)
/********************* DEBUGGING FUNCTIONS **********************/
static int SuffPrintName(void *s, void *dummy)
static int SuffPrintName(void *s, void *dummy MAKE_ATTR_UNUSED)
{
(void)dummy;
fprintf(debug_file, "%s ", ((Suff *)s)->name);
return 0;
}
static int
SuffPrintSuff(void *sp, void *dummy)
SuffPrintSuff(void *sp, void *dummy MAKE_ATTR_UNUSED)
{
Suff *s = (Suff *)sp;
int flags;
int flag;
(void)dummy;
fprintf(debug_file, "# `%s' [%d] ", s->name, s->refCount);
flags = s->flags;
@ -2650,12 +2645,10 @@ SuffPrintSuff(void *sp, void *dummy)
}
static int
SuffPrintTrans(void *tp, void *dummy)
SuffPrintTrans(void *tp, void *dummy MAKE_ATTR_UNUSED)
{
GNode *t = (GNode *)tp;
(void)dummy;
fprintf(debug_file, "%-16s: ", t->name);
Targ_PrintType(t->type);
fputc('\n', debug_file);

View File

@ -1,4 +1,4 @@
/* $NetBSD: targ.c,v 1.61 2016/01/17 17:45:21 christos Exp $ */
/* $NetBSD: targ.c,v 1.62 2017/04/16 19:53:58 riastradh Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
static char rcsid[] = "$NetBSD: targ.c,v 1.61 2016/01/17 17:45:21 christos Exp $";
static char rcsid[] = "$NetBSD: targ.c,v 1.62 2017/04/16 19:53:58 riastradh Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)targ.c 8.2 (Berkeley) 3/19/94";
#else
__RCSID("$NetBSD: targ.c,v 1.61 2016/01/17 17:45:21 christos Exp $");
__RCSID("$NetBSD: targ.c,v 1.62 2017/04/16 19:53:58 riastradh Exp $");
#endif
#endif /* not lint */
#endif
@ -521,10 +521,10 @@ TargPrintName(void *gnp, void *pflags MAKE_ATTR_UNUSED)
int
Targ_PrintCmd(void *cmd, void *dummy)
Targ_PrintCmd(void *cmd, void *dummy MAKE_ATTR_UNUSED)
{
fprintf(debug_file, "\t%s\n", (char *)cmd);
return (dummy ? 0 : 0);
return 0;
}
/*-

View File

@ -1,4 +1,4 @@
/* $NetBSD: var.c,v 1.213 2017/02/01 18:39:27 sjg Exp $ */
/* $NetBSD: var.c,v 1.214 2017/04/16 19:53:58 riastradh Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
static char rcsid[] = "$NetBSD: var.c,v 1.213 2017/02/01 18:39:27 sjg Exp $";
static char rcsid[] = "$NetBSD: var.c,v 1.214 2017/04/16 19:53:58 riastradh Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94";
#else
__RCSID("$NetBSD: var.c,v 1.213 2017/02/01 18:39:27 sjg Exp $");
__RCSID("$NetBSD: var.c,v 1.214 2017/04/16 19:53:58 riastradh Exp $");
#endif
#endif /* not lint */
#endif
@ -1182,7 +1182,7 @@ Var_Value(const char *name, GNode *ctxt, char **frp)
static Boolean
VarHead(GNode *ctx MAKE_ATTR_UNUSED, Var_Parse_State *vpstate,
char *word, Boolean addSpace, Buffer *buf,
void *dummy)
void *dummy MAKE_ATTR_UNUSED)
{
char *slash;
@ -1203,7 +1203,7 @@ VarHead(GNode *ctx MAKE_ATTR_UNUSED, Var_Parse_State *vpstate,
Buf_AddByte(buf, vpstate->varSpace);
Buf_AddByte(buf, '.');
}
return(dummy ? TRUE : TRUE);
return TRUE;
}
/*-
@ -1230,7 +1230,7 @@ VarHead(GNode *ctx MAKE_ATTR_UNUSED, Var_Parse_State *vpstate,
static Boolean
VarTail(GNode *ctx MAKE_ATTR_UNUSED, Var_Parse_State *vpstate,
char *word, Boolean addSpace, Buffer *buf,
void *dummy)
void *dummy MAKE_ATTR_UNUSED)
{
char *slash;
@ -1246,7 +1246,7 @@ VarTail(GNode *ctx MAKE_ATTR_UNUSED, Var_Parse_State *vpstate,
} else {
Buf_AddBytes(buf, strlen(word), word);
}
return (dummy ? TRUE : TRUE);
return TRUE;
}
/*-
@ -1272,7 +1272,7 @@ VarTail(GNode *ctx MAKE_ATTR_UNUSED, Var_Parse_State *vpstate,
static Boolean
VarSuffix(GNode *ctx MAKE_ATTR_UNUSED, Var_Parse_State *vpstate,
char *word, Boolean addSpace, Buffer *buf,
void *dummy)
void *dummy MAKE_ATTR_UNUSED)
{
char *dot;
@ -1286,7 +1286,7 @@ VarSuffix(GNode *ctx MAKE_ATTR_UNUSED, Var_Parse_State *vpstate,
dot[-1] = '.';
addSpace = TRUE;
}
return (dummy ? addSpace : addSpace);
return addSpace;
}
/*-
@ -1313,7 +1313,7 @@ VarSuffix(GNode *ctx MAKE_ATTR_UNUSED, Var_Parse_State *vpstate,
static Boolean
VarRoot(GNode *ctx MAKE_ATTR_UNUSED, Var_Parse_State *vpstate,
char *word, Boolean addSpace, Buffer *buf,
void *dummy)
void *dummy MAKE_ATTR_UNUSED)
{
char *dot;
@ -1329,7 +1329,7 @@ VarRoot(GNode *ctx MAKE_ATTR_UNUSED, Var_Parse_State *vpstate,
} else {
Buf_AddBytes(buf, strlen(word), word);
}
return (dummy ? TRUE : TRUE);
return TRUE;
}
/*-