Displaying 5 results from an estimated 5 matches for "localvar_stop".
2020 Mar 28
0
[klibc:update-dash] dash: eval: Always set localvar_stop
...libc.git;a=commit;h=a4d612ae4f36810afb28b497e867714a01cbec82
Author: Herbert Xu <herbert at gondor.apana.org.au>
AuthorDate: Thu, 31 May 2018 01:15:34 +0800
Committer: Ben Hutchings <ben at decadent.org.uk>
CommitDate: Sat, 28 Mar 2020 21:42:55 +0000
[klibc] dash: eval: Always set localvar_stop
[ dash commit 42298df5898a62f0df893be3af029d7e981623bd ]
The variable localvar_stop is set iff vlocal is true. gcc doesn't
get this so we get a spurious warning.
This patch fixes this by always calling pushlocalvars with vlocal
and making it only actually do the push if vlocal is non-zero....
2019 Jan 25
0
[klibc:update-dash] eval: Restore input files in evalcommand
...++--
usr/dash/input.h | 1 +
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/usr/dash/eval.c b/usr/dash/eval.c
index 811c28a4..5fd1c7c1 100644
--- a/usr/dash/eval.c
+++ b/usr/dash/eval.c
@@ -694,6 +694,7 @@ evalcommand(union node *cmd, int flags)
#endif
{
struct localvar_list *localvar_stop;
+ struct parsefile *file_stop;
struct redirtab *redir_stop;
struct stackmark smark;
union node *argp;
@@ -722,6 +723,7 @@ evalcommand(union node *cmd, int flags)
TRACE(("evalcommand(0x%lx, %d) called\n", (long)cmd, flags));
setstackmark(&smark);
localvar_stop = pushlocalv...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Restore input files in evalcommand
...++--
usr/dash/input.h | 1 +
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/usr/dash/eval.c b/usr/dash/eval.c
index 26055493..e28e56cb 100644
--- a/usr/dash/eval.c
+++ b/usr/dash/eval.c
@@ -694,6 +694,7 @@ evalcommand(union node *cmd, int flags)
#endif
{
struct localvar_list *localvar_stop;
+ struct parsefile *file_stop;
struct redirtab *redir_stop;
struct stackmark smark;
union node *argp;
@@ -722,6 +723,7 @@ evalcommand(union node *cmd, int flags)
TRACE(("evalcommand(0x%lx, %d) called\n", (long)cmd, flags));
setstackmark(&smark);
localvar_stop = pushlocalv...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Replace with listsetvar with mklocal/setvareq
...ar **nargv;
+ int vflags;
+ int vlocal;
errlinno = lineno = cmd->ncmd.linno;
if (funcline)
@@ -745,7 +747,6 @@ evalcommand(union node *cmd, int flags)
/* First expand the arguments. */
TRACE(("evalcommand(0x%lx, %d) called\n", (long)cmd, flags));
setstackmark(&smark);
- localvar_stop = pushlocalvars();
file_stop = parsefile;
back_exitstatus = 0;
@@ -759,6 +760,8 @@ evalcommand(union node *cmd, int flags)
cmd_flag = 0;
execcmd = 0;
spclbltin = -1;
+ vflags = 0;
+ vlocal = 0;
path = NULL;
argc = 0;
@@ -770,6 +773,8 @@ evalcommand(union node *cmd, int flags)...
2020 Mar 28
0
[klibc:update-dash] dash: eval: avoid leaking memory associated with redirections
...DE);
for (cp = n->ncase.cases ; cp && evalskip == 0 ; cp = cp->nclist.next) {
@@ -459,8 +460,6 @@ evalcase(union node *n, int flags)
}
}
out:
- popstackmark(&smark);
-
return status;
}
@@ -717,7 +716,6 @@ evalcommand(union node *cmd, int flags)
struct localvar_list *localvar_stop;
struct parsefile *file_stop;
struct redirtab *redir_stop;
- struct stackmark smark;
union node *argp;
struct arglist arglist;
struct arglist varlist;
@@ -746,7 +744,6 @@ evalcommand(union node *cmd, int flags)
/* First expand the arguments. */
TRACE(("evalcommand(0x%lx, %d) ca...