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

Re: Another unused function argument in sched.c



2016/01/30 00:06, I wrote:

> In function schedaddtimed(time_t t) (Src/Builtins/sched.c, line 61)
> the argument 't' is not used.

Is this OK? (i.e., remove the argument 't')

diff --git a/Src/Builtins/sched.c b/Src/Builtins/sched.c
index 1b9c68f..70625ed 100644
--- a/Src/Builtins/sched.c
+++ b/Src/Builtins/sched.c
@@ -58,7 +58,7 @@ static int schedcmdtimed;
 
 /**/
 static void
-schedaddtimed(time_t t)
+schedaddtimed(void)
 {
     /*
      * The following code shouldn't be necessary and indicates
@@ -140,7 +140,7 @@ checksched(void)
 	     */
 	    DPUTS(timedfns && firstnode(timedfns),
 		  "BUG: already timed fn (1)");
-	    schedaddtimed(schedcmds->time);
+	    schedaddtimed();
 	}
     }
 }
@@ -180,7 +180,7 @@ bin_sched(char *nam, char **argv, UNUSED(Options ops), UNUSED(int func))
 		schedcmds = sch->next;
 		if (schedcmds) {
 		    DPUTS(timedfns && firstnode(timedfns), "BUG: already timed fn (2)");
-		    schedaddtimed(schedcmds->time);
+		    schedaddtimed();
 		}
 	    }
 	    zsfree(sch->cmd);
@@ -317,7 +317,7 @@ bin_sched(char *nam, char **argv, UNUSED(Options ops), UNUSED(int func))
 	    sch->next = schedcmds;
 	    schedcmds = sch;
 	    DPUTS(timedfns && firstnode(timedfns), "BUG: already timed fn (3)");
-	    schedaddtimed(t);
+	    schedaddtimed();
 	} else {
 	    for (sch2 = schedcmds;
 		 sch2->next && sch2->next->time < sch->time;
@@ -330,7 +330,7 @@ bin_sched(char *nam, char **argv, UNUSED(Options ops), UNUSED(int func))
 	sch->next = NULL;
 	schedcmds = sch;
 	DPUTS(timedfns && firstnode(timedfns), "BUG: already timed fn (4)");
-	schedaddtimed(t);
+	schedaddtimed();
     }
     return 0;
 }





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