aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2020-02-16 19:06:42 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2020-02-16 19:29:31 +0100
commit3f4847b6d9198a359e98933271af4630b3c41f0a (patch)
treeaf3289428e99c91837dfa7dbf113332a70904006
parente368d851e78a2eb2aee50b8bad29dcc301feec65 (diff)
downloadbusybox-w32-3f4847b6d9198a359e98933271af4630b3c41f0a.tar.gz
busybox-w32-3f4847b6d9198a359e98933271af4630b3c41f0a.tar.bz2
busybox-w32-3f4847b6d9198a359e98933271af4630b3c41f0a.zip
ash: shell: Fix clang warnings about "string plus integer"
Upstream commit: Date: Sat, 15 Dec 2018 18:49:31 +0100 shell: Fix clang warnings about "string plus integer" Building with clang results in some warnings about integer values being added to strings. While the code itself is fine and the warnings are indeed harmless, fixing them also makes the semantic more explicit: what it is actually being increased is the address which points to the start of the string in order to skip the initial character when some conditions are met. Signed-off-by: Antonio Ospite <ao2@ao2.it> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--shell/ash.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c
index a43b65680..a25d14de0 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -4799,7 +4799,8 @@ cmdputs(const char *s)
4799 str = "${"; 4799 str = "${";
4800 goto dostr; 4800 goto dostr;
4801 case CTLENDVAR: 4801 case CTLENDVAR:
4802 str = "\"}" + !(quoted & 1); 4802 str = "\"}";
4803 str += !(quoted & 1);
4803 quoted >>= 1; 4804 quoted >>= 1;
4804 subtype = 0; 4805 subtype = 0;
4805 goto dostr; 4806 goto dostr;