Skip to content

Commit

Permalink
Marked unused parameters with the new UNUSED() macro.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wayne Davison committed Jun 2, 2004
1 parent 30a139f commit fb0937a
Show file tree
Hide file tree
Showing 58 changed files with 641 additions and 593 deletions.
10 changes: 5 additions & 5 deletions Src/Builtins/rlimits.c
Expand Up @@ -289,7 +289,7 @@ printulimit(int lim, int hard, int head)

/**/
static int
bin_limit(char *nam, char **argv, Options ops, int func)
bin_limit(UNUSED(char *nam), char **argv, Options ops, UNUSED(int func))
{
char *s;
int hard, limnum, lim;
Expand Down Expand Up @@ -397,7 +397,7 @@ bin_limit(char *nam, char **argv, Options ops, int func)

/**/
static int
bin_unlimit(char *nam, char **argv, Options ops, int func)
bin_unlimit(char *nam, char **argv, Options ops, UNUSED(int func))
{
int hard, limnum, lim;
int ret = 0;
Expand Down Expand Up @@ -460,7 +460,7 @@ bin_unlimit(char *nam, char **argv, Options ops, int func)

/**/
static int
bin_ulimit(char *name, char **argv, Options ops, int func)
bin_ulimit(char *name, char **argv, UNUSED(Options ops), UNUSED(int func))
{
int res, resmask = 0, hard = 0, soft = 0, nres = 0, all = 0;
char *options;
Expand Down Expand Up @@ -668,7 +668,7 @@ static struct builtin bintab[] = {

/**/
int
setup_(Module m)
setup_(UNUSED(Module m))
{
return 0;
}
Expand All @@ -690,7 +690,7 @@ cleanup_(Module m)

/**/
int
finish_(Module m)
finish_(UNUSED(Module m))
{
return 0;
}
6 changes: 3 additions & 3 deletions Src/Builtins/sched.c
Expand Up @@ -46,7 +46,7 @@ static struct schedcmd *schedcmds;

/**/
static int
bin_sched(char *nam, char **argv, Options ops, int func)
bin_sched(UNUSED(char *nam), char **argv, UNUSED(Options ops), UNUSED(int func))
{
char *s = *argv++;
time_t t;
Expand Down Expand Up @@ -183,7 +183,7 @@ static struct builtin bintab[] = {

/**/
int
setup_(Module m)
setup_(UNUSED(Module m))
{
return 0;
}
Expand Down Expand Up @@ -216,7 +216,7 @@ cleanup_(Module m)

/**/
int
finish_(Module m)
finish_(UNUSED(Module m))
{
return 0;
}
4 changes: 2 additions & 2 deletions Src/Modules/cap.c
Expand Up @@ -124,7 +124,7 @@ static struct builtin bintab[] = {

/**/
int
setup_(Module m)
setup_(UNUSED(Module m))
{
return 0;
}
Expand All @@ -146,7 +146,7 @@ cleanup_(Module m)

/**/
int
finish_(Module m)
finish_(UNUSED(Module m))
{
return 0;
}
6 changes: 3 additions & 3 deletions Src/Modules/clone.c
Expand Up @@ -41,7 +41,7 @@

/**/
static int
bin_clone(char *nam, char **args, Options ops, int func)
bin_clone(char *nam, char **args, UNUSED(Options ops), UNUSED(int func))
{
int ttyfd, pid, cttyfd;

Expand Down Expand Up @@ -111,7 +111,7 @@ static struct builtin bintab[] = {

/**/
int
setup_(Module m)
setup_(UNUSED(Module m))
{
return 0;
}
Expand All @@ -133,7 +133,7 @@ cleanup_(Module m)

/**/
int
finish_(Module m)
finish_(UNUSED(Module m))
{
return 0;
}
6 changes: 3 additions & 3 deletions Src/Modules/datetime.c
Expand Up @@ -32,7 +32,7 @@
#include <time.h>

static int
bin_strftime(char *nam, char **argv, Options ops, int func)
bin_strftime(char *nam, char **argv, Options ops, UNUSED(int func))
{
int bufsize, x;
char *endptr = NULL, *scalar = NULL, *buffer;
Expand Down Expand Up @@ -93,7 +93,7 @@ static struct paramdef patab[] = {

/**/
int
setup_(Module m)
setup_(UNUSED(Module m))
{
return 0;
}
Expand Down Expand Up @@ -124,7 +124,7 @@ cleanup_(Module m)

/**/
int
finish_(Module m)
finish_(UNUSED(Module m))
{
return 0;
}
14 changes: 7 additions & 7 deletions Src/Modules/example.c
Expand Up @@ -39,7 +39,7 @@ static char **arrparam;

/**/
static int
bin_example(char *nam, char **args, Options ops, int func)
bin_example(char *nam, char **args, Options ops, UNUSED(int func))
{
unsigned char c;
char **oargs = args, **p = arrparam;
Expand Down Expand Up @@ -76,7 +76,7 @@ bin_example(char *nam, char **args, Options ops, int func)

/**/
static int
cond_p_len(char **a, int id)
cond_p_len(char **a, UNUSED(int id))
{
char *s1 = cond_str(a, 0, 0);

Expand All @@ -91,7 +91,7 @@ cond_p_len(char **a, int id)

/**/
static int
cond_i_ex(char **a, int id)
cond_i_ex(char **a, UNUSED(int id))
{
char *s1 = cond_str(a, 0, 0), *s2 = cond_str(a, 1, 0);

Expand All @@ -100,7 +100,7 @@ cond_i_ex(char **a, int id)

/**/
static mnumber
math_sum(char *name, int argc, mnumber *argv, int id)
math_sum(UNUSED(char *name), int argc, mnumber *argv, UNUSED(int id))
{
mnumber ret;
int f = 0;
Expand Down Expand Up @@ -129,7 +129,7 @@ math_sum(char *name, int argc, mnumber *argv, int id)

/**/
static mnumber
math_length(char *name, char *arg, int id)
math_length(UNUSED(char *name), char *arg, UNUSED(int id))
{
mnumber ret;

Expand Down Expand Up @@ -186,7 +186,7 @@ static struct funcwrap wrapper[] = {

/**/
int
setup_(Module m)
setup_(UNUSED(Module m))
{
printf("The example module has now been set up.\n");
fflush(stdout);
Expand Down Expand Up @@ -224,7 +224,7 @@ cleanup_(Module m)

/**/
int
finish_(Module m)
finish_(UNUSED(Module m))
{
printf("Thank you for using the example module. Have a nice day.\n");
fflush(stdout);
Expand Down
18 changes: 9 additions & 9 deletions Src/Modules/files.c
Expand Up @@ -56,7 +56,7 @@ ask(void)

/**/
static int
bin_sync(char *nam, char **args, Options ops, int func)
bin_sync(UNUSED(char *nam), UNUSED(char **args), UNUSED(Options ops), UNUSED(int func))
{
sync();
return 0;
Expand All @@ -66,7 +66,7 @@ bin_sync(char *nam, char **args, Options ops, int func)

/**/
static int
bin_mkdir(char *nam, char **args, Options ops, int func)
bin_mkdir(char *nam, char **args, Options ops, UNUSED(int func))
{
mode_t oumask = umask(0);
mode_t mode = 0777 & ~oumask;
Expand Down Expand Up @@ -143,7 +143,7 @@ domkdir(char *nam, char *path, mode_t mode, int p)

/**/
static int
bin_rmdir(char *nam, char **args, Options ops, int func)
bin_rmdir(char *nam, char **args, UNUSED(Options ops), UNUSED(int func))
{
int err = 0;

Expand Down Expand Up @@ -477,7 +477,7 @@ recursivecmd_dorec(struct recursivecmd const *reccmd,

/**/
static int
recurse_donothing(char *arg, char *rp, struct stat const *sp, void *magic)
recurse_donothing(UNUSED(char *arg), UNUSED(char *rp), UNUSED(struct stat const *sp), UNUSED(void *magic))
{
return 0;
}
Expand Down Expand Up @@ -541,7 +541,7 @@ rm_leaf(char *arg, char *rp, struct stat const *sp, void *magic)

/**/
static int
rm_dirpost(char *arg, char *rp, struct stat const *sp, void *magic)
rm_dirpost(char *arg, char *rp, UNUSED(struct stat const *sp), void *magic)
{
struct rmmagic *rmm = magic;

Expand All @@ -563,7 +563,7 @@ rm_dirpost(char *arg, char *rp, struct stat const *sp, void *magic)

/**/
static int
bin_rm(char *nam, char **args, Options ops, int func)
bin_rm(char *nam, char **args, Options ops, UNUSED(int func))
{
struct rmmagic rmm;
int err;
Expand All @@ -589,7 +589,7 @@ struct chownmagic {

/**/
static int
chown_dochown(char *arg, char *rp, struct stat const *sp, void *magic)
chown_dochown(char *arg, char *rp, UNUSED(struct stat const *sp), void *magic)
{
struct chownmagic *chm = magic;

Expand Down Expand Up @@ -708,7 +708,7 @@ static struct builtin bintab[] = {

/**/
int
setup_(Module m)
setup_(UNUSED(Module m))
{
return 0;
}
Expand All @@ -730,7 +730,7 @@ cleanup_(Module m)

/**/
int
finish_(Module m)
finish_(UNUSED(Module m))
{
return 0;
}
12 changes: 6 additions & 6 deletions Src/Modules/langinfo.c
Expand Up @@ -439,7 +439,7 @@ createlihash()

/**/
static HashNode
getlanginfo(HashTable ht, char *name)
getlanginfo(UNUSED(HashTable ht), char *name)
{
int len, *elem;
char *listr;
Expand Down Expand Up @@ -480,7 +480,7 @@ getlanginfo(HashTable ht, char *name)

/**/
static void
scanlanginfo(HashTable ht, ScanFunc func, int flags)
scanlanginfo(UNUSED(HashTable ht), ScanFunc func, int flags)
{
Param pm = NULL;
char **element, *langstr;
Expand Down Expand Up @@ -515,14 +515,14 @@ scanlanginfo(HashTable ht, ScanFunc func, int flags)

/**/
int
setup_(Module m)
setup_(UNUSED(Module m))
{
return 0;
}

/**/
int
boot_(Module m)
boot_(UNUSED(Module m))
{
#ifdef HAVE_NL_LANGINFO
if (!createlihash())
Expand All @@ -535,7 +535,7 @@ boot_(Module m)

/**/
int
cleanup_(Module m)
cleanup_(UNUSED(Module m))
{
#ifdef HAVE_NL_LANGINFO
Param pm;
Expand All @@ -551,7 +551,7 @@ cleanup_(Module m)

/**/
int
finish_(Module m)
finish_(UNUSED(Module m))
{
return 0;
}

0 comments on commit fb0937a

Please sign in to comment.