Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make make(1): fix lint warnings
details: https://anonhg.NetBSD.org/src/rev/41b43495fe32
branches: trunk
changeset: 949314:41b43495fe32
user: rillig <rillig%NetBSD.org@localhost>
date: Sat Jan 09 16:06:09 2021 +0000
description:
make(1): fix lint warnings
diffstat:
usr.bin/make/arch.c | 5 ++-
usr.bin/make/cond.c | 11 ++++++-
usr.bin/make/enum.c | 5 ++-
usr.bin/make/filemon/filemon_ktrace.c | 52 ++++++++++++++++++++--------------
usr.bin/make/for.c | 6 ++--
usr.bin/make/job.c | 8 ++++-
usr.bin/make/main.c | 14 ++++----
usr.bin/make/meta.c | 6 ++--
usr.bin/make/suff.c | 6 ++-
usr.bin/make/var.c | 14 ++++++--
10 files changed, 78 insertions(+), 49 deletions(-)
diffs (truncated from 548 to 300 lines):
diff -r ff263786afec -r 41b43495fe32 usr.bin/make/arch.c
--- a/usr.bin/make/arch.c Sat Jan 09 15:32:06 2021 +0000
+++ b/usr.bin/make/arch.c Sat Jan 09 16:06:09 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: arch.c,v 1.192 2020/12/30 10:03:16 rillig Exp $ */
+/* $NetBSD: arch.c,v 1.193 2021/01/09 16:06:09 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -126,7 +126,7 @@
#include "config.h"
/* "@(#)arch.c 8.2 (Berkeley) 1/2/94" */
-MAKE_RCSID("$NetBSD: arch.c,v 1.192 2020/12/30 10:03:16 rillig Exp $");
+MAKE_RCSID("$NetBSD: arch.c,v 1.193 2021/01/09 16:06:09 rillig Exp $");
typedef struct List ArchList;
typedef struct ListNode ArchListNode;
@@ -871,6 +871,7 @@
* Both the modification time of the library and of the RANLIBMAG member are
* set to 'now'.
*/
+/*ARGSUSED*/
void
Arch_TouchLib(GNode *gn MAKE_ATTR_UNUSED)
{
diff -r ff263786afec -r 41b43495fe32 usr.bin/make/cond.c
--- a/usr.bin/make/cond.c Sat Jan 09 15:32:06 2021 +0000
+++ b/usr.bin/make/cond.c Sat Jan 09 16:06:09 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cond.c,v 1.233 2020/12/30 10:03:16 rillig Exp $ */
+/* $NetBSD: cond.c,v 1.234 2021/01/09 16:06:09 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -95,7 +95,7 @@
#include "dir.h"
/* "@(#)cond.c 8.2 (Berkeley) 1/2/94" */
-MAKE_RCSID("$NetBSD: cond.c,v 1.233 2020/12/30 10:03:16 rillig Exp $");
+MAKE_RCSID("$NetBSD: cond.c,v 1.234 2021/01/09 16:06:09 rillig Exp $");
/*
* The parsing of conditional expressions is based on this grammar:
@@ -286,6 +286,7 @@
}
/* Test whether the given variable is defined. */
+/*ARGSUSED*/
static Boolean
FuncDefined(size_t argLen MAKE_ATTR_UNUSED, const char *arg)
{
@@ -296,6 +297,7 @@
}
/* See if the given target is being made. */
+/*ARGSUSED*/
static Boolean
FuncMake(size_t argLen MAKE_ATTR_UNUSED, const char *arg)
{
@@ -308,6 +310,7 @@
}
/* See if the given file exists. */
+/*ARGSUSED*/
static Boolean
FuncExists(size_t argLen MAKE_ATTR_UNUSED, const char *arg)
{
@@ -323,6 +326,7 @@
}
/* See if the given node exists and is an actual target. */
+/*ARGSUSED*/
static Boolean
FuncTarget(size_t argLen MAKE_ATTR_UNUSED, const char *arg)
{
@@ -334,6 +338,7 @@
* See if the given node exists and is an actual target with commands
* associated with it.
*/
+/*ARGSUSED*/
static Boolean
FuncCommands(size_t argLen MAKE_ATTR_UNUSED, const char *arg)
{
@@ -697,6 +702,7 @@
* The argument to empty() is a variable name, optionally followed by
* variable modifiers.
*/
+/*ARGSUSED*/
static size_t
ParseEmptyArg(const char **pp, Boolean doEval,
const char *func MAKE_ATTR_UNUSED, char **out_arg)
@@ -733,6 +739,7 @@
return magic_res;
}
+/*ARGSUSED*/
static Boolean
FuncEmpty(size_t arglen, const char *arg MAKE_ATTR_UNUSED)
{
diff -r ff263786afec -r 41b43495fe32 usr.bin/make/enum.c
--- a/usr.bin/make/enum.c Sat Jan 09 15:32:06 2021 +0000
+++ b/usr.bin/make/enum.c Sat Jan 09 16:06:09 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: enum.c,v 1.13 2020/12/30 10:03:16 rillig Exp $ */
+/* $NetBSD: enum.c,v 1.14 2021/01/09 16:06:09 rillig Exp $ */
/*
Copyright (c) 2020 Roland Illig <rillig%NetBSD.org@localhost>
@@ -29,7 +29,7 @@
#include "make.h"
-MAKE_RCSID("$NetBSD: enum.c,v 1.13 2020/12/30 10:03:16 rillig Exp $");
+MAKE_RCSID("$NetBSD: enum.c,v 1.14 2021/01/09 16:06:09 rillig Exp $");
/*
* Convert a bitset into a string representation, showing the names of the
@@ -88,4 +88,5 @@
return spec->es_name;
}
abort(/* unknown enum value */);
+ /*NOTREACHED*/
}
diff -r ff263786afec -r 41b43495fe32 usr.bin/make/filemon/filemon_ktrace.c
--- a/usr.bin/make/filemon/filemon_ktrace.c Sat Jan 09 15:32:06 2021 +0000
+++ b/usr.bin/make/filemon/filemon_ktrace.c Sat Jan 09 16:06:09 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: filemon_ktrace.c,v 1.9 2020/12/31 17:39:36 rillig Exp $ */
+/* $NetBSD: filemon_ktrace.c,v 1.10 2021/01/09 16:06:09 rillig Exp $ */
/*-
* Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -130,6 +130,7 @@
char *path[/*npath*/];
};
+/*ARGSUSED*/
static int
compare_filemon_states(void *cookie, const void *na, const void *nb)
{
@@ -147,6 +148,7 @@
return 0;
}
+/*ARGSUSED*/
static int
compare_filemon_key(void *cookie, const void *n, const void *k)
{
@@ -581,7 +583,7 @@
}
static struct filemon_state *
-syscall_enter(struct filemon *F,
+syscall_enter(
const struct filemon_key *key, const struct ktr_syscall *call,
unsigned npath,
void (*show)(struct filemon *, const struct filemon_state *,
@@ -663,7 +665,7 @@
show_execve(struct filemon *F, const struct filemon_state *S,
const struct ktr_sysret *ret)
{
- return show_paths(F, S, ret, "E");
+ show_paths(F, S, ret, "E");
}
static void
@@ -751,18 +753,20 @@
show_paths(F, S, ret, "M");
}
+/*ARGSUSED*/
static struct filemon_state *
filemon_sys_chdir(struct filemon *F, const struct filemon_key *key,
const struct ktr_syscall *call)
{
- return syscall_enter(F, key, call, 1, &show_chdir);
+ return syscall_enter(key, call, 1, &show_chdir);
}
+/*ARGSUSED*/
static struct filemon_state *
filemon_sys_execve(struct filemon *F, const struct filemon_key *key,
const struct ktr_syscall *call)
{
- return syscall_enter(F, key, call, 1, &show_execve);
+ return syscall_enter(key, call, 1, &show_execve);
}
static struct filemon_state *
@@ -782,20 +786,23 @@
return NULL;
}
+/*ARGSUSED*/
static struct filemon_state *
filemon_sys_fork(struct filemon *F, const struct filemon_key *key,
const struct ktr_syscall *call)
{
- return syscall_enter(F, key, call, 0, &show_fork);
+ return syscall_enter(key, call, 0, &show_fork);
}
+/*ARGSUSED*/
static struct filemon_state *
filemon_sys_link(struct filemon *F, const struct filemon_key *key,
const struct ktr_syscall *call)
{
- return syscall_enter(F, key, call, 2, &show_link);
+ return syscall_enter(key, call, 2, &show_link);
}
+/*ARGSUSED*/
static struct filemon_state *
filemon_sys_open(struct filemon *F, const struct filemon_key *key,
const struct ktr_syscall *call)
@@ -808,15 +815,16 @@
flags = (int)args[1];
if ((flags & O_RDWR) == O_RDWR)
- return syscall_enter(F, key, call, 1, &show_open_readwrite);
+ return syscall_enter(key, call, 1, &show_open_readwrite);
else if ((flags & O_WRONLY) == O_WRONLY)
- return syscall_enter(F, key, call, 1, &show_open_write);
+ return syscall_enter(key, call, 1, &show_open_write);
else if ((flags & O_RDONLY) == O_RDONLY)
- return syscall_enter(F, key, call, 1, &show_open_read);
+ return syscall_enter(key, call, 1, &show_open_read);
else
return NULL; /* XXX Do we care if no read or write? */
}
+/*ARGSUSED*/
static struct filemon_state *
filemon_sys_openat(struct filemon *F, const struct filemon_key *key,
const struct ktr_syscall *call)
@@ -831,47 +839,47 @@
if (fd == AT_CWD) {
if ((flags & O_RDWR) == O_RDWR)
- return syscall_enter(F, key, call, 1,
+ return syscall_enter(key, call, 1,
&show_open_readwrite);
else if ((flags & O_WRONLY) == O_WRONLY)
- return syscall_enter(F, key, call, 1,
- &show_open_write);
+ return syscall_enter(key, call, 1, &show_open_write);
else if ((flags & O_RDONLY) == O_RDONLY)
- return syscall_enter(F, key, call, 1, &show_open_read);
+ return syscall_enter(key, call, 1, &show_open_read);
else
return NULL;
} else {
if ((flags & O_RDWR) == O_RDWR)
- return syscall_enter(F, key, call, 1,
+ return syscall_enter(key, call, 1,
&show_openat_readwrite);
else if ((flags & O_WRONLY) == O_WRONLY)
- return syscall_enter(F, key, call, 1,
- &show_openat_write);
+ return syscall_enter(key, call, 1, &show_openat_write);
else if ((flags & O_RDONLY) == O_RDONLY)
- return syscall_enter(F, key, call, 1,
- &show_openat_read);
+ return syscall_enter(key, call, 1, &show_openat_read);
else
return NULL;
}
}
+/*ARGSUSED*/
static struct filemon_state *
filemon_sys_symlink(struct filemon *F, const struct filemon_key *key,
const struct ktr_syscall *call)
{
- return syscall_enter(F, key, call, 2, &show_symlink);
+ return syscall_enter(key, call, 2, &show_symlink);
}
+/*ARGSUSED*/
static struct filemon_state *
filemon_sys_unlink(struct filemon *F, const struct filemon_key *key,
const struct ktr_syscall *call)
{
- return syscall_enter(F, key, call, 1, &show_unlink);
+ return syscall_enter(key, call, 1, &show_unlink);
}
+/*ARGSUSED*/
static struct filemon_state *
filemon_sys_rename(struct filemon *F, const struct filemon_key *key,
const struct ktr_syscall *call)
{
- return syscall_enter(F, key, call, 2, &show_rename);
+ return syscall_enter(key, call, 2, &show_rename);
}
diff -r ff263786afec -r 41b43495fe32 usr.bin/make/for.c
--- a/usr.bin/make/for.c Sat Jan 09 15:32:06 2021 +0000
+++ b/usr.bin/make/for.c Sat Jan 09 16:06:09 2021 +0000
@@ -1,4 +1,4 @@
Home |
Main Index |
Thread Index |
Old Index