search for: outfmt

Displaying 5 results from an estimated 5 matches for "outfmt".

Did you mean: outfit
2020 Mar 28
0
[klibc:master] dash: shell: Fix clang warnings about "string plus integer"
...dash/eval.c index ae83508b..dd144948 100644 --- a/usr/dash/eval.c +++ b/usr/dash/eval.c @@ -1081,7 +1081,8 @@ eprintlist(struct output *out, struct strlist *sp, int sep) while (sp) { const char *p; - p = " %s" + (1 - sep); + p = " %s"; + p += (1 - sep); sep |= 1; outfmt(out, p, sp->text); sp = sp->next; diff --git a/usr/dash/jobs.c b/usr/dash/jobs.c index 009bbfee..b9ff1402 100644 --- a/usr/dash/jobs.c +++ b/usr/dash/jobs.c @@ -1394,7 +1394,8 @@ cmdputs(const char *s) str = "${"; goto dostr; case CTLENDVAR: - str = "\"}&q...
2012 Oct 01
0
[klibc:master] Avoid overflow for very long variable name
...w for very long variable name Otherwise, this: $ perl -le 'print "v"x(2**31+1) ."=1"' | dash provokes integer overflow: (gdb) bt #0 doformat (dest=0x61d580, f=0x416a08 "%s: %d: %s: ", ap=0x7fffffffd308) at output.c:310 #1 0x00000000004128c1 in outfmt (file=0x61d580, fmt=0x416a08 "%s: %d: %s: ") at output.c:257 #2 0x000000000040382e in exvwarning2 (msg=0x417339 "Out of space", ap=0x7fffffffd468) at error.c:125 #3 0x000000000040387e in exverror (cond=1, msg=0x417339 "Out of space", ap=0x7fffff...
2020 Mar 28
0
[klibc:update-dash] dash: exec: Do not allocate stack string in padvance
...gt;cmdtype != CMDFUNCTION) @@ -789,9 +789,9 @@ describe_command(out, command, path, verbose) p = command; } else { do { - p = padvance(&path, command); - stunalloc(p); + padvance(&path, command); } while (--j >= 0); + p = stackblock(); } if (verbose) { outfmt( diff --git a/usr/dash/exec.h b/usr/dash/exec.h index 9ccb305f..e241b742 100644 --- a/usr/dash/exec.h +++ b/usr/dash/exec.h @@ -62,7 +62,7 @@ extern const char *pathopt; /* set by padvance */ void shellexec(char **, const char *, int) __attribute__((__noreturn__)); -char *padvance(const cha...
2020 Mar 27
2
[PATCH v2 5/5] Clean up clang warnings
...sor) + if ((!exitstatus) == isor) break; if (!evalskip) { n = n->nbinary.ch2; @@ -1081,7 +1081,7 @@ eprintlist(struct output *out, struct strlist *sp, int sep) while (sp) { const char *p; - p = " %s" + (1 - sep); + p = &" %s"[1 - sep]; sep |= 1; outfmt(out, p, sp->text); sp = sp->next; diff --git a/usr/dash/jobs.c b/usr/dash/jobs.c index 009bbfeee47e..776983b708d6 100644 --- a/usr/dash/jobs.c +++ b/usr/dash/jobs.c @@ -426,7 +426,7 @@ sprint_status(char *s, int status, int sigonly) goto out; #endif } - col = fmtstr(s, 32, strsig...
2020 Mar 27
12
[PATCH 0/5] Clang compatibility patches
This is a series of patches for clang compatibility: - Using flags needed flags and removing unsupported flags. - Adding support for clang's LLD linker. - Removing a variety of warnings. Bill Wendling (3): [klibc] Kbuild: use "libc.a" with clang [klibc] Kbuild: Add "-fcommon" for clang builds [klibc] Clean up clang warnings Michael Davidson (1): [klibc] Kbuild: