even more hacks to pass “-O666 -fstrict-overflow -Wstrict-overflow=9 -flto=jobserver” with “gcc version 4.8.0 20120930 (experimental) [trunk revision 191865] (Debian 20120930-1)” ☹ plus make the rtchecks mandatory

This commit is contained in:
tg
2012-10-03 17:24:23 +00:00
parent c39bfe09ee
commit d8662eb228
9 changed files with 115 additions and 69 deletions

9
exec.c
View File

@ -23,7 +23,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/exec.c,v 1.100 2012/10/03 15:13:30 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/exec.c,v 1.101 2012/10/03 17:24:18 tg Exp $");
#ifndef MKSH_DEFAULT_EXECSHELL
#define MKSH_DEFAULT_EXECSHELL "/bin/sh"
@ -1653,9 +1653,10 @@ dbteste_isa(Test_env *te, Test_meta meta)
char buf[8];
char *q = buf;
for (p = *te->pos.wp;
*p == CHAR && q < &buf[sizeof(buf) - 1]; p += 2)
*q++ = p[1];
p = *te->pos.wp;
while (*p++ == CHAR &&
(size_t)(q - buf) < sizeof(buf) - 1)
*q++ = *p++;
*q = '\0';
ret = test_isop(meta, buf);
}