Keep LLVM+Clang from nagging about “"foo" + 1 ≠ "foo1"” warning.

This commit is contained in:
tg 2012-12-04 01:10:35 +00:00
parent 7fc9e1b492
commit 5a70000aaf

6
tree.c
View File

@ -23,7 +23,7 @@
#include "sh.h" #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 #define INDENT 8
@ -37,6 +37,8 @@ static void iofree(struct ioword **, Area *);
/* "foo& ; bar" and "foo |& ; bar" are invalid */ /* "foo& ; bar" and "foo |& ; bar" are invalid */
static bool prevent_semicolon; static bool prevent_semicolon;
static const char Telif_pT[] = "elif %T";
/* /*
* print a command tree * print a command tree
*/ */
@ -160,7 +162,7 @@ ptree(struct op *t, int indent, struct shf *shf)
fptreef(shf, indent, "%;"); fptreef(shf, indent, "%;");
process_TIF: process_TIF:
/* 5 == strlen("elif ") */ /* 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; t1 = t1->right;
if (t1->left != NULL) { if (t1->left != NULL) {
fptreef(shf, indent, "%;"); fptreef(shf, indent, "%;");