Module Name: src
Committed By: rillig
Date: Wed Dec 15 09:53:42 UTC 2021
Modified Files:
src/usr.bin/make: dir.h hash.h job.h lst.h make.h make_malloc.h meta.h
metachar.h nonints.h
Log Message:
make: mark several functions whose result must be used
Suggested by sjg, to catch more bugs like the memory leak in cond.c
1.303 from 2021-12-13.
No binary change.
To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/usr.bin/make/dir.h
cvs rdiff -u -r1.41 -r1.42 src/usr.bin/make/hash.h
cvs rdiff -u -r1.73 -r1.74 src/usr.bin/make/job.h
cvs rdiff -u -r1.99 -r1.100 src/usr.bin/make/lst.h
cvs rdiff -u -r1.273 -r1.274 src/usr.bin/make/make.h
cvs rdiff -u -r1.16 -r1.17 src/usr.bin/make/make_malloc.h
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/make/meta.h
cvs rdiff -u -r1.17 -r1.18 src/usr.bin/make/metachar.h
cvs rdiff -u -r1.218 -r1.219 src/usr.bin/make/nonints.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/make/dir.h
diff -u src/usr.bin/make/dir.h:1.44 src/usr.bin/make/dir.h:1.45
--- src/usr.bin/make/dir.h:1.44 Sat Apr 3 11:08:40 2021
+++ src/usr.bin/make/dir.h Wed Dec 15 09:53:41 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: dir.h,v 1.44 2021/04/03 11:08:40 rillig Exp $ */
+/* $NetBSD: dir.h,v 1.45 2021/12/15 09:53:41 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -82,18 +82,18 @@ void Dir_InitCur(const char *);
void Dir_InitDot(void);
void Dir_End(void);
void Dir_SetPATH(void);
-bool Dir_HasWildcards(const char *);
+bool Dir_HasWildcards(const char *) MAKE_ATTR_USE;
void SearchPath_Expand(SearchPath *, const char *, StringList *);
-char *Dir_FindFile(const char *, SearchPath *);
-char *Dir_FindHereOrAbove(const char *, const char *);
+char *Dir_FindFile(const char *, SearchPath *) MAKE_ATTR_USE;
+char *Dir_FindHereOrAbove(const char *, const char *) MAKE_ATTR_USE;
void Dir_UpdateMTime(GNode *, bool);
CachedDir *SearchPath_Add(SearchPath *, const char *);
-char *SearchPath_ToFlags(SearchPath *, const char *);
+char *SearchPath_ToFlags(SearchPath *, const char *) MAKE_ATTR_USE;
void SearchPath_Clear(SearchPath *);
void SearchPath_AddAll(SearchPath *, SearchPath *);
void Dir_PrintDirectories(void);
void SearchPath_Print(const SearchPath *);
-SearchPath *Dir_CopyDirSearchPath(void);
+SearchPath *Dir_CopyDirSearchPath(void) MAKE_ATTR_USE;
/* Stripped-down variant of struct stat. */
struct cached_stat {
Index: src/usr.bin/make/hash.h
diff -u src/usr.bin/make/hash.h:1.41 src/usr.bin/make/hash.h:1.42
--- src/usr.bin/make/hash.h:1.41 Tue Dec 7 21:58:01 2021
+++ src/usr.bin/make/hash.h Wed Dec 15 09:53:41 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: hash.h,v 1.41 2021/12/07 21:58:01 rillig Exp $ */
+/* $NetBSD: hash.h,v 1.42 2021/12/15 09:53:41 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -108,7 +108,7 @@ typedef struct HashSet {
HashTable tbl;
} HashSet;
-MAKE_INLINE void *
+MAKE_INLINE void * MAKE_ATTR_USE
HashEntry_Get(HashEntry *h)
{
return h->value;
@@ -131,11 +131,13 @@ HashIter_Init(HashIter *hi, HashTable *t
void HashTable_Init(HashTable *);
void HashTable_Done(HashTable *);
-HashEntry *HashTable_FindEntry(HashTable *, const char *);
-void *HashTable_FindValue(HashTable *, const char *);
-unsigned int Hash_Substring(Substring);
-void *HashTable_FindValueBySubstringHash(HashTable *, Substring, unsigned int);
+HashEntry *HashTable_FindEntry(HashTable *, const char *) MAKE_ATTR_USE;
+void *HashTable_FindValue(HashTable *, const char *) MAKE_ATTR_USE;
+unsigned int Hash_Substring(Substring) MAKE_ATTR_USE;
+void *HashTable_FindValueBySubstringHash(HashTable *, Substring, unsigned int)
+ MAKE_ATTR_USE;
HashEntry *HashTable_CreateEntry(HashTable *, const char *, bool *);
+/* TODO: change return type to void */
HashEntry *HashTable_Set(HashTable *, const char *, void *);
void HashTable_DeleteEntry(HashTable *, HashEntry *);
void HashTable_DebugStats(HashTable *, const char *);
@@ -164,7 +166,7 @@ HashSet_Add(HashSet *set, const char *ke
return isNew;
}
-MAKE_INLINE bool
+MAKE_INLINE bool MAKE_ATTR_USE
HashSet_Contains(HashSet *set, const char *key)
{
return HashTable_FindEntry(&set->tbl, key) != NULL;
Index: src/usr.bin/make/job.h
diff -u src/usr.bin/make/job.h:1.73 src/usr.bin/make/job.h:1.74
--- src/usr.bin/make/job.h:1.73 Sat Apr 3 11:08:40 2021
+++ src/usr.bin/make/job.h Wed Dec 15 09:53:41 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: job.h,v 1.73 2021/04/03 11:08:40 rillig Exp $ */
+/* $NetBSD: job.h,v 1.74 2021/12/15 09:53:41 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -187,24 +187,25 @@ extern char *shellErrFlag;
extern int jobTokensRunning; /* tokens currently "out" */
void Shell_Init(void);
-const char *Shell_GetNewline(void);
+const char *Shell_GetNewline(void) MAKE_ATTR_USE;
void Job_Touch(GNode *, bool);
-bool Job_CheckCommands(GNode *, void (*abortProc)(const char *, ...));
+bool Job_CheckCommands(GNode *, void (*abortProc)(const char *, ...))
+ MAKE_ATTR_USE;
void Job_CatchChildren(void);
void Job_CatchOutput(void);
void Job_Make(GNode *);
void Job_Init(void);
-bool Job_ParseShell(char *);
+bool Job_ParseShell(char *) MAKE_ATTR_USE;
int Job_Finish(void);
void Job_End(void);
void Job_Wait(void);
void Job_AbortAll(void);
void Job_TokenReturn(void);
-bool Job_TokenWithdraw(void);
+bool Job_TokenWithdraw(void) MAKE_ATTR_USE;
void Job_ServerStart(int, int, int);
void Job_SetPrefix(void);
bool Job_RunTarget(const char *, const char *);
void Job_FlagsToString(const Job *, char *, size_t);
-int Job_TempFile(const char *, char *, size_t);
+int Job_TempFile(const char *, char *, size_t) MAKE_ATTR_USE;
#endif /* MAKE_JOB_H */
Index: src/usr.bin/make/lst.h
diff -u src/usr.bin/make/lst.h:1.99 src/usr.bin/make/lst.h:1.100
--- src/usr.bin/make/lst.h:1.99 Sun Dec 5 10:11:31 2021
+++ src/usr.bin/make/lst.h Wed Dec 15 09:53:41 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: lst.h,v 1.99 2021/12/05 10:11:31 rillig Exp $ */
+/* $NetBSD: lst.h,v 1.100 2021/12/15 09:53:41 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -104,7 +104,7 @@ typedef void LstFreeProc(void *);
/* Create or destroy a list */
/* Create a new list. */
-List *Lst_New(void);
+List *Lst_New(void) MAKE_ATTR_USE;
/* Free the list nodes, but not the list itself. */
void Lst_Done(List *);
/* Free the list nodes, freeing the node data using the given function. */
@@ -124,14 +124,14 @@ Lst_Init(List *list)
/* Get information about a list */
-MAKE_INLINE bool
+MAKE_INLINE bool MAKE_ATTR_USE
Lst_IsEmpty(List *list)
{
return list->first == NULL;
}
/* Find the first node that contains the given datum, or NULL. */
-ListNode *Lst_FindDatum(List *, const void *);
+ListNode *Lst_FindDatum(List *, const void *) MAKE_ATTR_USE;
/* Modify a list */
@@ -163,7 +163,7 @@ Lst_Enqueue(List *list, void *datum) {
}
/* Remove the head node of the queue and return its datum. */
-void *Lst_Dequeue(List *);
+void *Lst_Dequeue(List *) MAKE_ATTR_USE;
/*
* A vector is an ordered collection of items, allowing for fast indexed
@@ -182,7 +182,7 @@ void Vector_Init(Vector *, size_t);
* Return the pointer to the given item in the vector.
* The returned data is valid until the next modifying operation.
*/
-MAKE_INLINE void *
+MAKE_INLINE void * MAKE_ATTR_USE
Vector_Get(Vector *v, size_t i)
{
unsigned char *items = v->items;
Index: src/usr.bin/make/make.h
diff -u src/usr.bin/make/make.h:1.273 src/usr.bin/make/make.h:1.274
--- src/usr.bin/make/make.h:1.273 Wed Dec 15 09:29:55 2021
+++ src/usr.bin/make/make.h Wed Dec 15 09:53:41 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: make.h,v 1.273 2021/12/15 09:29:55 rillig Exp $ */
+/* $NetBSD: make.h,v 1.274 2021/12/15 09:53:41 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -689,75 +689,75 @@ extern CmdOpts opts;
#include "nonints.h"
void GNode_UpdateYoungestChild(GNode *, GNode *);
-bool GNode_IsOODate(GNode *);
+bool GNode_IsOODate(GNode *) MAKE_ATTR_USE;
void Make_ExpandUse(GNodeList *);
-time_t Make_Recheck(GNode *);
+time_t Make_Recheck(GNode *) MAKE_ATTR_USE;
void Make_HandleUse(GNode *, GNode *);
void Make_Update(GNode *);
void GNode_SetLocalVars(GNode *);
bool Make_Run(GNodeList *);
-bool shouldDieQuietly(GNode *, int);
+bool shouldDieQuietly(GNode *, int) MAKE_ATTR_USE;
void PrintOnError(GNode *, const char *);
void Main_ExportMAKEFLAGS(bool);
bool Main_SetObjdir(bool, const char *, ...) MAKE_ATTR_PRINTFLIKE(2, 3);
-int mkTempFile(const char *, char *, size_t);
+int mkTempFile(const char *, char *, size_t) MAKE_ATTR_USE;
int str2Lst_Append(StringList *, char *);
void GNode_FprintDetails(FILE *, const char *, const GNode *, const char *);
-bool GNode_ShouldExecute(GNode *gn);
+bool GNode_ShouldExecute(GNode *gn) MAKE_ATTR_USE;
/* See if the node was seen on the left-hand side of a dependency operator. */
-MAKE_INLINE bool
+MAKE_INLINE bool MAKE_ATTR_USE
GNode_IsTarget(const GNode *gn)
{
return (gn->type & OP_OPMASK) != OP_NONE;
}
-MAKE_INLINE const char *
+MAKE_INLINE const char * MAKE_ATTR_USE
GNode_Path(const GNode *gn)
{
return gn->path != NULL ? gn->path : gn->name;
}
-MAKE_INLINE bool
+MAKE_INLINE bool MAKE_ATTR_USE
GNode_IsWaitingFor(const GNode *gn)
{
return gn->flags.remake && gn->made <= REQUESTED;
}
-MAKE_INLINE bool
+MAKE_INLINE bool MAKE_ATTR_USE
GNode_IsReady(const GNode *gn)
{
return gn->made > DEFERRED;
}
-MAKE_INLINE bool
+MAKE_INLINE bool MAKE_ATTR_USE
GNode_IsDone(const GNode *gn)
{
return gn->made >= MADE;
}
-MAKE_INLINE bool
+MAKE_INLINE bool MAKE_ATTR_USE
GNode_IsError(const GNode *gn)
{
return gn->made == ERROR || gn->made == ABORTED;
}
-MAKE_INLINE const char *
+MAKE_INLINE const char * MAKE_ATTR_USE
GNode_VarTarget(GNode *gn) { return GNode_ValueDirect(gn, TARGET); }
-MAKE_INLINE const char *
+MAKE_INLINE const char * MAKE_ATTR_USE
GNode_VarOodate(GNode *gn) { return GNode_ValueDirect(gn, OODATE); }
-MAKE_INLINE const char *
+MAKE_INLINE const char * MAKE_ATTR_USE
GNode_VarAllsrc(GNode *gn) { return GNode_ValueDirect(gn, ALLSRC); }
-MAKE_INLINE const char *
+MAKE_INLINE const char * MAKE_ATTR_USE
GNode_VarImpsrc(GNode *gn) { return GNode_ValueDirect(gn, IMPSRC); }
-MAKE_INLINE const char *
+MAKE_INLINE const char * MAKE_ATTR_USE
GNode_VarPrefix(GNode *gn) { return GNode_ValueDirect(gn, PREFIX); }
-MAKE_INLINE const char *
+MAKE_INLINE const char * MAKE_ATTR_USE
GNode_VarArchive(GNode *gn) { return GNode_ValueDirect(gn, ARCHIVE); }
-MAKE_INLINE const char *
+MAKE_INLINE const char * MAKE_ATTR_USE
GNode_VarMember(GNode *gn) { return GNode_ValueDirect(gn, MEMBER); }
-MAKE_INLINE void *
+MAKE_INLINE void * MAKE_ATTR_USE
UNCONST(const void *ptr)
{
void *ret;
@@ -780,19 +780,19 @@ UNCONST(const void *ptr)
#define KILLPG(pid, sig) killpg((pid), (sig))
#endif
-MAKE_INLINE bool
+MAKE_INLINE bool MAKE_ATTR_USE
ch_isalnum(char ch) { return isalnum((unsigned char)ch) != 0; }
-MAKE_INLINE bool
+MAKE_INLINE bool MAKE_ATTR_USE
ch_isalpha(char ch) { return isalpha((unsigned char)ch) != 0; }
-MAKE_INLINE bool
+MAKE_INLINE bool MAKE_ATTR_USE
ch_isdigit(char ch) { return isdigit((unsigned char)ch) != 0; }
-MAKE_INLINE bool
+MAKE_INLINE bool MAKE_ATTR_USE
ch_isspace(char ch) { return isspace((unsigned char)ch) != 0; }
-MAKE_INLINE bool
+MAKE_INLINE bool MAKE_ATTR_USE
ch_isupper(char ch) { return isupper((unsigned char)ch) != 0; }
-MAKE_INLINE char
+MAKE_INLINE char MAKE_ATTR_USE
ch_tolower(char ch) { return (char)tolower((unsigned char)ch); }
-MAKE_INLINE char
+MAKE_INLINE char MAKE_ATTR_USE
ch_toupper(char ch) { return (char)toupper((unsigned char)ch); }
MAKE_INLINE void
Index: src/usr.bin/make/make_malloc.h
diff -u src/usr.bin/make/make_malloc.h:1.16 src/usr.bin/make/make_malloc.h:1.17
--- src/usr.bin/make/make_malloc.h:1.16 Tue Jan 19 20:51:46 2021
+++ src/usr.bin/make/make_malloc.h Wed Dec 15 09:53:41 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: make_malloc.h,v 1.16 2021/01/19 20:51:46 rillig Exp $ */
+/* $NetBSD: make_malloc.h,v 1.17 2021/12/15 09:53:41 rillig Exp $ */
/*
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -27,10 +27,10 @@
*/
#ifndef USE_EMALLOC
-void *bmake_malloc(size_t);
-void *bmake_realloc(void *, size_t);
-char *bmake_strdup(const char *);
-char *bmake_strldup(const char *, size_t);
+void *bmake_malloc(size_t) MAKE_ATTR_USE;
+void *bmake_realloc(void *, size_t) MAKE_ATTR_USE;
+char *bmake_strdup(const char *) MAKE_ATTR_USE;
+char *bmake_strldup(const char *, size_t) MAKE_ATTR_USE;
#else
#include <util.h>
#define bmake_malloc(n) emalloc(n)
@@ -39,7 +39,7 @@ char *bmake_strldup(const char *, size_t
#define bmake_strldup(s, n) estrndup(s, n)
#endif
-char *bmake_strsedup(const char *, const char *);
+char *bmake_strsedup(const char *, const char *) MAKE_ATTR_USE;
/*
* Thin wrapper around free(3) to avoid the extra function call in case
Index: src/usr.bin/make/meta.h
diff -u src/usr.bin/make/meta.h:1.10 src/usr.bin/make/meta.h:1.11
--- src/usr.bin/make/meta.h:1.10 Sat Apr 3 11:08:40 2021
+++ src/usr.bin/make/meta.h Wed Dec 15 09:53:41 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: meta.h,v 1.10 2021/04/03 11:08:40 rillig Exp $ */
+/* $NetBSD: meta.h,v 1.11 2021/12/15 09:53:41 rillig Exp $ */
/*
* Things needed for 'meta' mode.
@@ -46,13 +46,13 @@ void meta_mode_init(const char *);
void meta_job_start(struct Job *, GNode *);
void meta_job_child(struct Job *);
void meta_job_parent(struct Job *, pid_t);
-int meta_job_fd(struct Job *);
-int meta_job_event(struct Job *);
+int meta_job_fd(struct Job *) MAKE_ATTR_USE;
+int meta_job_event(struct Job *) MAKE_ATTR_USE;
void meta_job_error(struct Job *, GNode *, bool, int);
void meta_job_output(struct Job *, char *, const char *);
int meta_cmd_finish(void *);
int meta_job_finish(struct Job *);
-bool meta_oodate(GNode *, bool);
+bool meta_oodate(GNode *, bool) MAKE_ATTR_USE;
void meta_compat_start(void);
void meta_compat_child(void);
void meta_compat_parent(pid_t);
Index: src/usr.bin/make/metachar.h
diff -u src/usr.bin/make/metachar.h:1.17 src/usr.bin/make/metachar.h:1.18
--- src/usr.bin/make/metachar.h:1.17 Mon Jun 21 18:54:41 2021
+++ src/usr.bin/make/metachar.h Wed Dec 15 09:53:41 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: metachar.h,v 1.17 2021/06/21 18:54:41 rillig Exp $ */
+/* $NetBSD: metachar.h,v 1.18 2021/12/15 09:53:41 rillig Exp $ */
/*
* Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -35,13 +35,13 @@
extern const unsigned char _metachar[];
-MAKE_INLINE bool
+MAKE_INLINE bool MAKE_ATTR_USE
is_shell_metachar(char c)
{
return _metachar[c & 0x7f] != 0;
}
-MAKE_INLINE bool
+MAKE_INLINE bool MAKE_ATTR_USE
needshell(const char *cmd)
{
while (!is_shell_metachar(*cmd) && *cmd != ':' && *cmd != '=')
Index: src/usr.bin/make/nonints.h
diff -u src/usr.bin/make/nonints.h:1.218 src/usr.bin/make/nonints.h:1.219
--- src/usr.bin/make/nonints.h:1.218 Mon Dec 13 00:33:33 2021
+++ src/usr.bin/make/nonints.h Wed Dec 15 09:53:41 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: nonints.h,v 1.218 2021/12/13 00:33:33 rillig Exp $ */
+/* $NetBSD: nonints.h,v 1.219 2021/12/15 09:53:41 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -82,8 +82,8 @@ void Arch_TouchLib(GNode *);
void Arch_UpdateMTime(GNode *gn);
void Arch_UpdateMemberMTime(GNode *gn);
void Arch_FindLib(GNode *, SearchPath *);
-bool Arch_LibOODate(GNode *);
-bool Arch_IsLib(GNode *);
+bool Arch_LibOODate(GNode *) MAKE_ATTR_USE;
+bool Arch_IsLib(GNode *) MAKE_ATTR_USE;
/* compat.c */
int Compat_RunCommand(const char *, GNode *, StringListNode *);
@@ -91,21 +91,21 @@ void Compat_Run(GNodeList *);
void Compat_Make(GNode *, GNode *);
/* cond.c */
-CondEvalResult Cond_EvalCondition(const char *, bool *);
-CondEvalResult Cond_EvalLine(const char *);
+CondEvalResult Cond_EvalCondition(const char *, bool *) MAKE_ATTR_USE;
+CondEvalResult Cond_EvalLine(const char *) MAKE_ATTR_USE;
void Cond_restore_depth(unsigned int);
-unsigned int Cond_save_depth(void);
+unsigned int Cond_save_depth(void) MAKE_ATTR_USE;
/* dir.c; see also dir.h */
-MAKE_INLINE const char *
+MAKE_INLINE const char * MAKE_ATTR_USE
str_basename(const char *pathname)
{
const char *lastSlash = strrchr(pathname, '/');
return lastSlash != NULL ? lastSlash + 1 : pathname;
}
-MAKE_INLINE SearchPath *
+MAKE_INLINE SearchPath * MAKE_ATTR_USE
SearchPath_New(void)
{
SearchPath *path = bmake_malloc(sizeof *path);
@@ -116,8 +116,8 @@ SearchPath_New(void)
void SearchPath_Free(SearchPath *);
/* for.c */
-int For_Eval(const char *);
-bool For_Accum(const char *);
+int For_Eval(const char *) MAKE_ATTR_USE;
+bool For_Accum(const char *) MAKE_ATTR_USE;
void For_Run(int);
/* job.c */
@@ -125,16 +125,16 @@ void JobReapChild(pid_t, int, bool);
/* main.c */
void Main_ParseArgLine(const char *);
-char *Cmd_Exec(const char *, const char **);
+char *Cmd_Exec(const char *, const char **) MAKE_ATTR_USE;
void Error(const char *, ...) MAKE_ATTR_PRINTFLIKE(1, 2);
void Fatal(const char *, ...) MAKE_ATTR_PRINTFLIKE(1, 2) MAKE_ATTR_DEAD;
void Punt(const char *, ...) MAKE_ATTR_PRINTFLIKE(1, 2) MAKE_ATTR_DEAD;
void DieHorribly(void) MAKE_ATTR_DEAD;
void Finish(int) MAKE_ATTR_DEAD;
-int eunlink(const char *);
+int eunlink(const char *) MAKE_ATTR_USE;
void execDie(const char *, const char *);
-char *getTmpdir(void);
-bool ParseBoolean(const char *, bool);
+char *getTmpdir(void) MAKE_ATTR_USE;
+bool ParseBoolean(const char *, bool) MAKE_ATTR_USE;
char *cached_realpath(const char *, char *);
/* parse.c */
@@ -158,13 +158,13 @@ typedef struct VarAssign {
typedef char *(*ReadMoreProc)(void *, size_t *);
void Parse_Error(ParseErrorLevel, const char *, ...) MAKE_ATTR_PRINTFLIKE(2, 3);
-bool Parse_IsVar(const char *, VarAssign *out_var);
+bool Parse_IsVar(const char *, VarAssign *out_var) MAKE_ATTR_USE;
void Parse_Var(VarAssign *, GNode *);
void Parse_AddIncludeDir(const char *);
void Parse_File(const char *, int);
void Parse_PushInput(const char *, int, int, ReadMoreProc, void *);
void Parse_MainName(GNodeList *);
-int Parse_NumErrors(void);
+int Parse_NumErrors(void) MAKE_ATTR_USE;
/* suff.c */
@@ -172,42 +172,42 @@ void Suff_Init(void);
void Suff_End(void);
void Suff_ClearSuffixes(void);
-bool Suff_IsTransform(const char *);
+bool Suff_IsTransform(const char *) MAKE_ATTR_USE;
GNode *Suff_AddTransform(const char *);
void Suff_EndTransform(GNode *);
void Suff_AddSuffix(const char *, GNode **);
-SearchPath *Suff_GetPath(const char *);
+SearchPath *Suff_GetPath(const char *) MAKE_ATTR_USE;
void Suff_ExtendPaths(void);
void Suff_AddInclude(const char *);
void Suff_AddLib(const char *);
void Suff_FindDeps(GNode *);
-SearchPath *Suff_FindPath(GNode *);
+SearchPath *Suff_FindPath(GNode *) MAKE_ATTR_USE;
void Suff_SetNull(const char *);
void Suff_PrintAll(void);
-char *Suff_NamesStr(void);
+char *Suff_NamesStr(void) MAKE_ATTR_USE;
/* targ.c */
void Targ_Init(void);
void Targ_End(void);
void Targ_Stats(void);
-GNodeList *Targ_List(void);
-GNode *GNode_New(const char *);
-GNode *Targ_FindNode(const char *);
-GNode *Targ_GetNode(const char *);
-GNode *Targ_NewInternalNode(const char *);
+GNodeList *Targ_List(void) MAKE_ATTR_USE;
+GNode *GNode_New(const char *) MAKE_ATTR_USE;
+GNode *Targ_FindNode(const char *) MAKE_ATTR_USE;
+GNode *Targ_GetNode(const char *) MAKE_ATTR_USE;
+GNode *Targ_NewInternalNode(const char *) MAKE_ATTR_USE;
GNode *Targ_GetEndNode(void);
void Targ_FindList(GNodeList *, StringList *);
-bool Targ_Precious(const GNode *);
+bool Targ_Precious(const GNode *) MAKE_ATTR_USE;
void Targ_SetMain(GNode *);
void Targ_PrintCmds(GNode *);
void Targ_PrintNode(GNode *, int);
void Targ_PrintNodes(GNodeList *, int);
-const char *Targ_FmtTime(time_t);
+const char *Targ_FmtTime(time_t) MAKE_ATTR_USE;
void Targ_PrintType(GNodeType);
void Targ_PrintGraph(int);
void Targ_Propagate(void);
-const char *GNodeMade_Name(GNodeMade);
+const char *GNodeMade_Name(GNodeMade) MAKE_ATTR_USE;
/* var.c */
void Var_Init(void);
@@ -317,10 +317,10 @@ void Var_SetWithFlags(GNode *, const cha
void Var_SetExpandWithFlags(GNode *, const char *, const char *, VarSetFlags);
void Var_Append(GNode *, const char *, const char *);
void Var_AppendExpand(GNode *, const char *, const char *);
-bool Var_Exists(GNode *, const char *);
-bool Var_ExistsExpand(GNode *, const char *);
-FStr Var_Value(GNode *, const char *);
-const char *GNode_ValueDirect(GNode *, const char *);
+bool Var_Exists(GNode *, const char *) MAKE_ATTR_USE;
+bool Var_ExistsExpand(GNode *, const char *) MAKE_ATTR_USE;
+FStr Var_Value(GNode *, const char *) MAKE_ATTR_USE;
+const char *GNode_ValueDirect(GNode *, const char *) MAKE_ATTR_USE;
VarParseResult Var_Parse(const char **, GNode *, VarEvalMode, FStr *);
VarParseResult Var_Subst(const char *, GNode *, VarEvalMode, char **);
void Var_Stats(void);