aboutsummaryrefslogtreecommitdiffstats
path: root/mps/code
diff options
context:
space:
mode:
authorRichard Kistruck2006-06-29 17:37:12 +0100
committerRichard Kistruck2006-06-29 17:37:12 +0100
commit8fffb7e63af2e57b2c92e033187eed3ad5d68970 (patch)
tree5b33a261539b32b89c0d586870b7d4cdf97dd0af /mps/code
parent10f4047f35f3edab08bc14ef29d06f69897c3e33 (diff)
parent18a63226de3a96b39ae05aa2902c661e7856ab52 (diff)
downloademacs-8fffb7e63af2e57b2c92e033187eed3ad5d68970.tar.gz
emacs-8fffb7e63af2e57b2c92e033187eed3ad5d68970.zip
Mps: attempt to fix w3i3mv "all" build with vc7:
(unknown if these changes are effective, but they should be safe) 1. mpm.c: +1 to array size to make room for terminator of string initializer; 2. testlib.c: disable warning 4702: unreachable code, for va_end. (integrate from version/1.106/...@158055) Copied from Perforce Change: 159469 ServerID: perforce.ravenbrook.com
Diffstat (limited to 'mps/code')
-rw-r--r--mps/code/mpm.c3
-rw-r--r--mps/code/testlib.c10
2 files changed, 12 insertions, 1 deletions
diff --git a/mps/code/mpm.c b/mps/code/mpm.c
index 0930be4c6d3..247cbd05a56 100644
--- a/mps/code/mpm.c
+++ b/mps/code/mpm.c
@@ -226,7 +226,8 @@ Bool ResIsAllocFailure(Res res)
226static Res WriteWord(mps_lib_FILE *stream, Word w, unsigned base, 226static Res WriteWord(mps_lib_FILE *stream, Word w, unsigned base,
227 unsigned width) 227 unsigned width)
228{ 228{
229 static const char digit[16] = "0123456789ABCDEF"; 229 static const char digit[16 + 1] = "0123456789ABCDEF";
230 /* + 1 for terminator: unused, but prevents compiler warning */
230 static const char pad = '0'; /* padding character */ 231 static const char pad = '0'; /* padding character */
231 char buf[MPS_WORD_WIDTH + 1]; /* enough for binary, */ 232 char buf[MPS_WORD_WIDTH + 1]; /* enough for binary, */
232 /* plus one for terminator */ 233 /* plus one for terminator */
diff --git a/mps/code/testlib.c b/mps/code/testlib.c
index 7010d2484d8..8cf36491cd3 100644
--- a/mps/code/testlib.c
+++ b/mps/code/testlib.c
@@ -18,6 +18,16 @@ struct itimerspec; /* stop complaints from time.h */
18#endif 18#endif
19#include <time.h> 19#include <time.h>
20 20
21#ifdef MPS_OS_W3
22#ifdef _MSC_VER
23#pragma warning(disable: 4702) /* unreachable code */
24 /* job000605: believed needed to prevent VC7 warning
25 * for error() below, in which va_end is mandated by
26 * ISO C (C99:7.15.1) even though it is unreachable.
27 */
28#endif
29#endif
30
21 31
22/* rnd -- a random number generator 32/* rnd -- a random number generator
23 * 33 *