add a few assertions for LLVM+Clang 3.2 scan-build; no !DEBUG changes

This commit is contained in:
tg
2012-12-08 18:30:31 +00:00
parent c4e88acd83
commit 0780070d24
5 changed files with 55 additions and 6 deletions

4
edit.c
View File

@ -28,7 +28,7 @@
#ifndef MKSH_NO_CMDLINE_EDITING
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.258 2012/12/04 01:18:26 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.259 2012/12/08 18:30:27 tg Exp $");
/*
* in later versions we might use libtermcap for this, but since external
@ -607,6 +607,8 @@ x_cf_glob(int *flagsp, const char *buf, int buflen, int pos, int *startp,
char **words = NULL;
bool is_command;
mkssert(buf != NULL);
len = x_locate_word(buf, buflen, pos, startp, &is_command);
if (!((*flagsp) & XCF_COMMAND))
is_command = false;