Hi tech,
there are a few void casts in rcs. But I have a question about that.
Are these casts really necessary? I've read that the compiler warns, because of
unused variables.
But no compiler warnings about that on amd64.
That's why I just added this small diff, in order to get feedback if the casts
are necessary or not.
fritjof
Index: rlog.c
===================================================================
RCS file: /cvs/src/usr.bin/rcs/rlog.c,v
retrieving revision 1.67
diff -u -p -r1.67 rlog.c
--- rlog.c 7 Jan 2014 14:08:16 -0000 1.67
+++ rlog.c 7 May 2014 20:24:37 -0000
@@ -517,7 +517,7 @@ rlog_rev_print(struct rcs_delta *rdp)
fmt = "%Y/%m/%d %H:%M:%S";
}
- (void)strftime(timeb, sizeof(timeb), fmt, &t);
+ strftime(timeb, sizeof(timeb), fmt, &t);
printf("\ndate: %s; author: %s; state: %s;", timeb, rdp->rd_author,
rdp->rd_state);
@@ -556,7 +556,7 @@ rlog_rev_print(struct rcs_delta *rdp)
TAILQ_FOREACH(rb, &(rdp->rd_branches), rb_list) {
RCSNUM *branch;
branch = rcsnum_revtobr(rb->rb_num);
- (void)rcsnum_tostr(branch, numb, sizeof(numb));
+ rcsnum_tostr(branch, numb, sizeof(numb));
printf(" %s;", numb);
rcsnum_free(branch);
}