ash: placate -Werror=format-security

"In function 'sprint_status48':
 error: format not a string literal and no format arguments"

function                                             old     new   delta
sprint_status48                                      160     158      -2

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2021-02-18 13:44:27 +01:00
parent 666a9a4c4d
commit 33745b1fc8
3 changed files with 21 additions and 3 deletions

View File

@ -4263,9 +4263,7 @@ sprint_status48(char *os, int status, int sigonly)
#endif
}
st &= 0x7f;
//TODO: use bbox's get_signame? strsignal adds ~600 bytes to text+rodata
//s = stpncpy(s, strsignal(st), 32); //not all libc have stpncpy()
s += fmtstr(s, 32, strsignal(st));
s = stpncpy(s, strsignal(st), 32);
if (WCOREDUMP(status)) {
s = stpcpy(s, " (core dumped)");
}