Keep LLVM+Clang from nagging about “"foo" + 1 ≠ "foo1"” warning.
This commit is contained in:
parent
7fc9e1b492
commit
5a70000aaf
8
tree.c
8
tree.c
@ -23,7 +23,7 @@
|
||||
|
||||
#include "sh.h"
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/tree.c,v 1.66 2012/11/30 20:19:16 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/tree.c,v 1.67 2012/12/04 01:10:35 tg Exp $");
|
||||
|
||||
#define INDENT 8
|
||||
|
||||
@ -37,6 +37,8 @@ static void iofree(struct ioword **, Area *);
|
||||
/* "foo& ; bar" and "foo |& ; bar" are invalid */
|
||||
static bool prevent_semicolon;
|
||||
|
||||
static const char Telif_pT[] = "elif %T";
|
||||
|
||||
/*
|
||||
* print a command tree
|
||||
*/
|
||||
@ -160,7 +162,7 @@ ptree(struct op *t, int indent, struct shf *shf)
|
||||
fptreef(shf, indent, "%;");
|
||||
process_TIF:
|
||||
/* 5 == strlen("elif ") */
|
||||
fptreef(shf, indent + 5 - i, "elif %T" + i, t1->left);
|
||||
fptreef(shf, indent + 5 - i, Telif_pT + i, t1->left);
|
||||
t1 = t1->right;
|
||||
if (t1->left != NULL) {
|
||||
fptreef(shf, indent, "%;");
|
||||
@ -177,7 +179,7 @@ ptree(struct op *t, int indent, struct shf *shf)
|
||||
break;
|
||||
case TWHILE:
|
||||
case TUNTIL:
|
||||
/* 6 == strlen("while"/"until") */
|
||||
/* 6 == strlen("while "/"until ") */
|
||||
fptreef(shf, indent + 6, "%s %T",
|
||||
(t->type == TWHILE) ? "while" : "until",
|
||||
t->left);
|
||||
|
Loading…
x
Reference in New Issue
Block a user