From c8ee91f02dc7cc75a0d77ae4030be86193b0c57c Mon Sep 17 00:00:00 2001 From: tg Date: Sat, 31 Dec 2011 00:47:46 +0000 Subject: [PATCH] LLVM+clang scan-build found a dead store and I found an unneeded assert --- histrap.c | 3 +-- var.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/histrap.c b/histrap.c index 0e2d51b..8a937e7 100644 --- a/histrap.c +++ b/histrap.c @@ -26,7 +26,7 @@ #include #endif -__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.116 2011/12/31 00:23:42 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.117 2011/12/31 00:47:45 tg Exp $"); Trap sigtraps[NSIG + 1]; static struct sigaction Sigact_ign; @@ -766,7 +766,6 @@ hist_init(Source *s) goto hist_trunc_abort; /* and of course the entries */ hp = history; - lines = s->line - (histptr - hp); while (hp < histptr) { if (!writehistline(fd, s->line - (histptr - hp), *hp)) diff --git a/var.c b/var.c index 2dcd815..42d958e 100644 --- a/var.c +++ b/var.c @@ -26,7 +26,7 @@ #include #endif -__RCSID("$MirOS: src/bin/mksh/var.c,v 1.139 2011/12/30 21:00:32 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/var.c,v 1.140 2011/12/31 00:47:46 tg Exp $"); /*- * Variables @@ -709,7 +709,6 @@ typeset(const char *var, uint32_t set, uint32_t clr, int field, int base) if (val == var) return (NULL); mkssert(var != NULL); - mkssert(*var != 0); if (*val == '[') { if (set_refflag != SRF_NOP) errorf("%s: %s", var,