From 5a70000aaf6d607ecabcb36cd792fc3cd3bbe40c Mon Sep 17 00:00:00 2001 From: tg Date: Tue, 4 Dec 2012 01:10:35 +0000 Subject: [PATCH] =?UTF-8?q?Keep=20LLVM+Clang=20from=20nagging=20about=20?= =?UTF-8?q?=E2=80=9C"foo"=20+=201=20=E2=89=A0=20"foo1"=E2=80=9D=20warning.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tree.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tree.c b/tree.c index 1513a14..8015a8d 100644 --- a/tree.c +++ b/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);