LLVM+clang scan-build found a dead store and I found an unneeded assert
This commit is contained in:
parent
5dbff1d56c
commit
c8ee91f02d
@ -26,7 +26,7 @@
|
|||||||
#include <sys/file.h>
|
#include <sys/file.h>
|
||||||
#endif
|
#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];
|
Trap sigtraps[NSIG + 1];
|
||||||
static struct sigaction Sigact_ign;
|
static struct sigaction Sigact_ign;
|
||||||
@ -766,7 +766,6 @@ hist_init(Source *s)
|
|||||||
goto hist_trunc_abort;
|
goto hist_trunc_abort;
|
||||||
/* and of course the entries */
|
/* and of course the entries */
|
||||||
hp = history;
|
hp = history;
|
||||||
lines = s->line - (histptr - hp);
|
|
||||||
while (hp < histptr) {
|
while (hp < histptr) {
|
||||||
if (!writehistline(fd,
|
if (!writehistline(fd,
|
||||||
s->line - (histptr - hp), *hp))
|
s->line - (histptr - hp), *hp))
|
||||||
|
3
var.c
3
var.c
@ -26,7 +26,7 @@
|
|||||||
#include <sys/sysctl.h>
|
#include <sys/sysctl.h>
|
||||||
#endif
|
#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
|
* Variables
|
||||||
@ -709,7 +709,6 @@ typeset(const char *var, uint32_t set, uint32_t clr, int field, int base)
|
|||||||
if (val == var)
|
if (val == var)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
mkssert(var != NULL);
|
mkssert(var != NULL);
|
||||||
mkssert(*var != 0);
|
|
||||||
if (*val == '[') {
|
if (*val == '[') {
|
||||||
if (set_refflag != SRF_NOP)
|
if (set_refflag != SRF_NOP)
|
||||||
errorf("%s: %s", var,
|
errorf("%s: %s", var,
|
||||||
|
Loading…
Reference in New Issue
Block a user