Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH] use UNUSED() consistently



Add UNUSED() to unused function args.
In db_gdbm.c, langinfo.c, mapfile.c and zle_word.c,
remove UNUSED() from args which are actually used.

---
 Src/Builtins/rlimits.c  |  2 +-
 Src/Builtins/sched.c    |  2 +-
 Src/Modules/curses.c    | 10 +++++-----
 Src/Modules/datetime.c  |  2 +-
 Src/Modules/db_gdbm.c   |  2 +-
 Src/Modules/files.c     |  2 +-
 Src/Modules/langinfo.c  |  2 +-
 Src/Modules/mapfile.c   |  2 +-
 Src/Modules/mathfunc.c  |  2 +-
 Src/Modules/newuser.c   |  4 ++--
 Src/Modules/parameter.c |  2 +-
 Src/Modules/pcre.c      |  2 +-
 Src/Modules/regex.c     |  2 +-
 Src/Modules/socket.c    |  2 +-
 Src/Modules/stat.c      |  2 +-
 Src/Modules/system.c    |  4 ++--
 Src/Modules/tcp.c       |  2 +-
 Src/Modules/termcap.c   |  2 +-
 Src/Modules/terminfo.c  |  2 +-
 Src/Modules/zpty.c      |  2 +-
 Src/Modules/zselect.c   |  2 +-
 Src/Modules/zutil.c     |  2 +-
 Src/Zle/compctl.c       |  2 +-
 Src/Zle/computil.c      |  2 +-
 Src/Zle/zle_utils.c     |  2 +-
 Src/Zle/zle_word.c      |  2 +-
 Src/hashtable.c         |  2 +-
 Src/hist.c              |  2 +-
 28 files changed, 34 insertions(+), 34 deletions(-)

diff --git a/Src/Builtins/rlimits.c b/Src/Builtins/rlimits.c
index 85ec181..8b664e3 100644
--- a/Src/Builtins/rlimits.c
+++ b/Src/Builtins/rlimits.c
@@ -1037,7 +1037,7 @@ enables_(Module m, int **enables)
 
 /**/
 int
-boot_(Module m)
+boot_(UNUSED(Module m))
 {
     return 0;
 }
diff --git a/Src/Builtins/sched.c b/Src/Builtins/sched.c
index 5d5dac6..1b9c68f 100644
--- a/Src/Builtins/sched.c
+++ b/Src/Builtins/sched.c
@@ -411,7 +411,7 @@ enables_(Module m, int **enables)
 
 /**/
 int
-boot_(Module m)
+boot_(UNUSED(Module m))
 {
     addprepromptfn(&checksched);
     return 0;
diff --git a/Src/Modules/curses.c b/Src/Modules/curses.c
index 64329f6..b8a79ed 100644
--- a/Src/Modules/curses.c
+++ b/Src/Modules/curses.c
@@ -299,7 +299,7 @@ zcurses_free_window(ZCWin w)
 }
 
 static struct zcurses_namenumberpair *
-zcurses_attrget(WINDOW *w, char *attr)
+zcurses_attrget(UNUSED(WINDOW *w), char *attr)
 {
     struct zcurses_namenumberpair *zca;
 
@@ -419,7 +419,7 @@ freecolorpairnode(HashNode hn)
  *************/
 
 static int
-zccmd_init(const char *nam, char **args)
+zccmd_init(UNUSED(const char *nam), UNUSED(char **args))
 {
     LinkNode stdscr_win = zcurses_getwindowbyname("stdscr");
 
@@ -808,7 +808,7 @@ zccmd_border(const char *nam, char **args)
 
 
 static int
-zccmd_endwin(const char *nam, char **args)
+zccmd_endwin(UNUSED(const char *nam), UNUSED(char **args))
 {
     LinkNode stdscr_win = zcurses_getwindowbyname("stdscr");
 
@@ -1496,7 +1496,7 @@ zccmd_touch(const char *nam, char **args)
 
 /**/
 static int
-bin_zcurses(char *nam, char **args, Options ops, UNUSED(int func))
+bin_zcurses(char *nam, char **args, UNUSED(Options ops), UNUSED(int func))
 {
     char **saargs;
     struct zcurses_subcommand *zcsc;
@@ -1693,7 +1693,7 @@ enables_(Module m, int **enables)
 
 /**/
 int
-boot_(Module m)
+boot_(UNUSED(Module m))
 {
     zcurses_windows = znewlinklist();
 
diff --git a/Src/Modules/datetime.c b/Src/Modules/datetime.c
index 86c61cf..bb82c54 100644
--- a/Src/Modules/datetime.c
+++ b/Src/Modules/datetime.c
@@ -292,7 +292,7 @@ enables_(Module m, int **enables)
 
 /**/
 int
-boot_(Module m)
+boot_(UNUSED(Module m))
 {
     return 0;
 }
diff --git a/Src/Modules/db_gdbm.c b/Src/Modules/db_gdbm.c
index 0329632..8dd60fc 100644
--- a/Src/Modules/db_gdbm.c
+++ b/Src/Modules/db_gdbm.c
@@ -390,7 +390,7 @@ boot_(UNUSED(Module m))
 
 /**/
 int
-cleanup_(UNUSED(Module m))
+cleanup_(Module m)
 {
     return setfeatureenables(m, &module_features, NULL);
 }
diff --git a/Src/Modules/files.c b/Src/Modules/files.c
index dbcff63..6f816ba 100644
--- a/Src/Modules/files.c
+++ b/Src/Modules/files.c
@@ -805,7 +805,7 @@ enables_(Module m, int **enables)
 
 /**/
 int
-boot_(Module m)
+boot_(UNUSED(Module m))
 {
     return 0;
 }
diff --git a/Src/Modules/langinfo.c b/Src/Modules/langinfo.c
index eb45d16..520b037 100644
--- a/Src/Modules/langinfo.c
+++ b/Src/Modules/langinfo.c
@@ -498,7 +498,7 @@ boot_(UNUSED(Module m))
 
 /**/
 int
-cleanup_(UNUSED(Module m))
+cleanup_(Module m)
 {
     return setfeatureenables(m, &module_features, NULL);
 }
diff --git a/Src/Modules/mapfile.c b/Src/Modules/mapfile.c
index 422c707..2503b36 100644
--- a/Src/Modules/mapfile.c
+++ b/Src/Modules/mapfile.c
@@ -306,7 +306,7 @@ boot_(UNUSED(Module m))
 
 /**/
 int
-cleanup_(UNUSED(Module m))
+cleanup_(Module m)
 {
     return setfeatureenables(m, &module_features, NULL);
 }
diff --git a/Src/Modules/mathfunc.c b/Src/Modules/mathfunc.c
index efadd86..451b3cf 100644
--- a/Src/Modules/mathfunc.c
+++ b/Src/Modules/mathfunc.c
@@ -599,7 +599,7 @@ enables_(Module m, int **enables)
 
 /**/
 int
-boot_(Module m)
+boot_(UNUSED(Module m))
 {
     return 0;
 }
diff --git a/Src/Modules/newuser.c b/Src/Modules/newuser.c
index efdb2ab..6f0d2e0 100644
--- a/Src/Modules/newuser.c
+++ b/Src/Modules/newuser.c
@@ -41,14 +41,14 @@ setup_(UNUSED(Module m))
 
 /**/
 int
-features_(Module m, char ***features)
+features_(UNUSED(Module m), UNUSED(char ***features))
 {
     return 1;
 }
 
 /**/
 int
-enables_(Module m, int **enables)
+enables_(UNUSED(Module m), UNUSED(int **enables))
 {
     return 0;
 }
diff --git a/Src/Modules/parameter.c b/Src/Modules/parameter.c
index 04d4485..edb0517 100644
--- a/Src/Modules/parameter.c
+++ b/Src/Modules/parameter.c
@@ -2190,7 +2190,7 @@ enables_(Module m, int **enables)
 
 /**/
 int
-boot_(Module m)
+boot_(UNUSED(Module m))
 {
     return 0;
 }
diff --git a/Src/Modules/pcre.c b/Src/Modules/pcre.c
index aa5c8ed..e23ab57 100644
--- a/Src/Modules/pcre.c
+++ b/Src/Modules/pcre.c
@@ -479,7 +479,7 @@ enables_(Module m, int **enables)
 
 /**/
 int
-boot_(Module m)
+boot_(UNUSED(Module m))
 {
     return 0;
 }
diff --git a/Src/Modules/regex.c b/Src/Modules/regex.c
index 16cc77f..edb7234 100644
--- a/Src/Modules/regex.c
+++ b/Src/Modules/regex.c
@@ -248,7 +248,7 @@ enables_(Module m, int **enables)
 
 /**/
 int
-boot_(Module m)
+boot_(UNUSED(Module m))
 {
     return 0;
 }
diff --git a/Src/Modules/socket.c b/Src/Modules/socket.c
index 7c3fb5e..c65b7df 100644
--- a/Src/Modules/socket.c
+++ b/Src/Modules/socket.c
@@ -310,7 +310,7 @@ enables_(Module m, int **enables)
 
 /**/
 int
-boot_(Module m)
+boot_(UNUSED(Module m))
 {
     return 0;
 }
diff --git a/Src/Modules/stat.c b/Src/Modules/stat.c
index 3961771..66baa12 100644
--- a/Src/Modules/stat.c
+++ b/Src/Modules/stat.c
@@ -659,7 +659,7 @@ enables_(Module m, int **enables)
 
 /**/
 int
-boot_(Module m)
+boot_(UNUSED(Module m))
 {
     return 0;
 }
diff --git a/Src/Modules/system.c b/Src/Modules/system.c
index 1ab1fb1..1ee61c0 100644
--- a/Src/Modules/system.c
+++ b/Src/Modules/system.c
@@ -439,7 +439,7 @@ bin_sysseek(char *nam, char **args, Options ops, UNUSED(int func))
 
 /**/
 static mnumber
-math_systell(UNUSED(char *name), int argc, mnumber *argv, UNUSED(int id))
+math_systell(UNUSED(char *name), UNUSED(int argc), mnumber *argv, UNUSED(int id))
 {
     int fd = (argv->type == MN_INTEGER) ? argv->u.l : (int)argv->u.d;
     mnumber ret;
@@ -834,7 +834,7 @@ enables_(Module m, int **enables)
 
 /**/
 int
-boot_(Module m)
+boot_(UNUSED(Module m))
 {
     return 0;
 }
diff --git a/Src/Modules/tcp.c b/Src/Modules/tcp.c
index 9fc1b29..5af6883 100644
--- a/Src/Modules/tcp.c
+++ b/Src/Modules/tcp.c
@@ -732,7 +732,7 @@ enables_(Module m, int **enables)
 
 /**/
 int
-boot_(Module m)
+boot_(UNUSED(Module m))
 {
     ztcp_sessions = znewlinklist();
     return 0;
diff --git a/Src/Modules/termcap.c b/Src/Modules/termcap.c
index cd0e858..29c2836 100644
--- a/Src/Modules/termcap.c
+++ b/Src/Modules/termcap.c
@@ -342,7 +342,7 @@ enables_(Module m, int **enables)
 
 /**/
 int
-boot_(Module m)
+boot_(UNUSED(Module m))
 {
 #ifdef HAVE_TGETENT
 # ifdef HAVE_SETUPTERM
diff --git a/Src/Modules/terminfo.c b/Src/Modules/terminfo.c
index 88e326f..e0439af 100644
--- a/Src/Modules/terminfo.c
+++ b/Src/Modules/terminfo.c
@@ -335,7 +335,7 @@ enables_(Module m, int **enables)
 
 /**/
 int
-boot_(Module m)
+boot_(UNUSED(Module m))
 {
 #ifdef USE_TERMINFO_MODULE
 # ifdef HAVE_SETUPTERM
diff --git a/Src/Modules/zpty.c b/Src/Modules/zpty.c
index 63ff757..0ef7539 100644
--- a/Src/Modules/zpty.c
+++ b/Src/Modules/zpty.c
@@ -891,7 +891,7 @@ enables_(Module m, int **enables)
 
 /**/
 int
-boot_(Module m)
+boot_(UNUSED(Module m))
 {
     ptycmds = NULL;
 
diff --git a/Src/Modules/zselect.c b/Src/Modules/zselect.c
index 30a3f51..8c12672 100644
--- a/Src/Modules/zselect.c
+++ b/Src/Modules/zselect.c
@@ -307,7 +307,7 @@ enables_(Module m, int **enables)
 
 /**/
 int
-boot_(Module m)
+boot_(UNUSED(Module m))
 {
     return 0;
 }
diff --git a/Src/Modules/zutil.c b/Src/Modules/zutil.c
index 12a4c03..477575c 100644
--- a/Src/Modules/zutil.c
+++ b/Src/Modules/zutil.c
@@ -1995,7 +1995,7 @@ enables_(Module m, int **enables)
 
 /**/
 int
-boot_(Module m)
+boot_(UNUSED(Module m))
 {
     return 0;
 }
diff --git a/Src/Zle/compctl.c b/Src/Zle/compctl.c
index 8381867..ce45762 100644
--- a/Src/Zle/compctl.c
+++ b/Src/Zle/compctl.c
@@ -3992,7 +3992,7 @@ enables_(Module m, int **enables)
 
 /**/
 int
-boot_(Module m)
+boot_(UNUSED(Module m))
 {
     addhookfunc("compctl_make", (Hookfn) ccmakehookfn);
     addhookfunc("compctl_cleanup", (Hookfn) cccleanuphookfn);
diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c
index 60fb096..e8f0a6f 100644
--- a/Src/Zle/computil.c
+++ b/Src/Zle/computil.c
@@ -4994,7 +4994,7 @@ enables_(Module m, int **enables)
 
 /**/
 int
-boot_(Module m)
+boot_(UNUSED(Module m))
 {
     return 0;
 }
diff --git a/Src/Zle/zle_utils.c b/Src/Zle/zle_utils.c
index 6e9a98b..a2c8810 100644
--- a/Src/Zle/zle_utils.c
+++ b/Src/Zle/zle_utils.c
@@ -1678,7 +1678,7 @@ viundochange(char **args)
 
 /**/
 int
-splitundo(char **args)
+splitundo(UNUSED(char **args))
 {
     if (vistartchange >= 0) {
 	mergeundo();
diff --git a/Src/Zle/zle_word.c b/Src/Zle/zle_word.c
index 2e6d75e..3c1f26c 100644
--- a/Src/Zle/zle_word.c
+++ b/Src/Zle/zle_word.c
@@ -153,7 +153,7 @@ emacsforwardword(char **args)
 
 /**/
 int
-viforwardblankwordend(UNUSED(char **args))
+viforwardblankwordend(char **args)
 {
     int n = zmult;
 
diff --git a/Src/hashtable.c b/Src/hashtable.c
index 0664c36..2d5af5b 100644
--- a/Src/hashtable.c
+++ b/Src/hashtable.c
@@ -558,7 +558,7 @@ printhashtabinfo(HashTable ht)
 
 /**/
 int
-bin_hashinfo(char *nam, char **args, Options ops, int func)
+bin_hashinfo(UNUSED(char *nam), UNUSED(char **args), UNUSED(Options ops), UNUSED(int func))
 {
     HashTable ht;
 
diff --git a/Src/hist.c b/Src/hist.c
index 7f9e4db..5fc40bd 100644
--- a/Src/hist.c
+++ b/Src/hist.c
@@ -468,7 +468,7 @@ herrflush(void)
 
 /**/
 static int
-getsubsargs(char *subline, int *gbalp, int *cflagp)
+getsubsargs(UNUSED(char *subline), int *gbalp, int *cflagp)
 {
     int del, follow;
     char *ptr1, *ptr2;
-- 
1.9.5 (Apple Git-50.3)




Messages sorted by: Reverse Date, Date, Thread, Author