zsh-workers
 help / color / mirror / code / Atom feed
From: "Jun T." <takimoto-j@kba.biglobe.ne.jp>
To: zsh-workers@zsh.org
Subject: Re: Another unused function argument in sched.c
Date: Thu, 4 Feb 2016 00:17:02 +0900	[thread overview]
Message-ID: <19E6ACAC-35B3-4972-824C-A486AEA7A0CC@kba.biglobe.ne.jp> (raw)
In-Reply-To: <42271C6F-3808-421A-B9DB-A66AE7CFFBA9@kba.biglobe.ne.jp>


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;
 }




  reply	other threads:[~2016-02-03 15:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-29 15:06 Jun T.
2016-02-03 15:17 ` Jun T. [this message]
2016-02-03 15:44   ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19E6ACAC-35B3-4972-824C-A486AEA7A0CC@kba.biglobe.ne.jp \
    --to=takimoto-j@kba.biglobe.ne.jp \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).