aboutsummaryrefslogtreecommitdiffstats
path: root/mps/code
diff options
context:
space:
mode:
authorDavid Lovemore2012-05-01 17:09:24 +0100
committerDavid Lovemore2012-05-01 17:09:24 +0100
commit52db7a8d59afb7e43ab675de91a079245c3d104b (patch)
treea6c87d45cd556597fd893a47a826c109dadbe8ab /mps/code
parentcf80843764eb1c7b7a6eb8153ef23613112fc0bb (diff)
parentc36033e00cb750ed44197f3f89a8b135d315d661 (diff)
downloademacs-52db7a8d59afb7e43ab675de91a079245c3d104b.tar.gz
emacs-52db7a8d59afb7e43ab675de91a079245c3d104b.zip
Merging from branch/2012-03-27/longest/... to bring over extra vararg fixes
Copied from Perforce Change: 178078 ServerID: perforce.ravenbrook.com
Diffstat (limited to 'mps/code')
-rw-r--r--mps/code/dumper.c2
-rw-r--r--mps/code/eventpro.c5
-rw-r--r--mps/code/libcbt.c2
-rw-r--r--mps/code/locusss.c4
-rw-r--r--mps/code/mpsicv.c9
5 files changed, 13 insertions, 9 deletions
diff --git a/mps/code/dumper.c b/mps/code/dumper.c
index b2bc31de86c..9fe373cf8c2 100644
--- a/mps/code/dumper.c
+++ b/mps/code/dumper.c
@@ -146,7 +146,7 @@ int main(int argc, char *argv[]) {
146 switch(header[0]) { 146 switch(header[0]) {
147#include "eventdef.h" 147#include "eventdef.h"
148 default: 148 default:
149 error("Unknown event code %08lX", header[0]); 149 error("Unknown event code %"PRIXPTR, (ulongest_t)header[0]);
150 } 150 }
151 } 151 }
152 } while(arg < argc); 152 } while(arg < argc);
diff --git a/mps/code/eventpro.c b/mps/code/eventpro.c
index 1997243ceb5..7583a9a70a9 100644
--- a/mps/code/eventpro.c
+++ b/mps/code/eventpro.c
@@ -14,6 +14,7 @@
14#include "eventpro.h" 14#include "eventpro.h"
15#include "misc.h" 15#include "misc.h"
16#include "mpmtypes.h" 16#include "mpmtypes.h"
17#include "testlib.h" /* for ulongest_t and associated print formats */
17 18
18#include <assert.h> /* assert */ 19#include <assert.h> /* assert */
19#include <stdlib.h> /* size_t */ 20#include <stdlib.h> /* size_t */
@@ -94,7 +95,7 @@ static size_t eventType2Index(EventType type)
94 for(i = 0; i < eventTypeCount; ++i) 95 for(i = 0; i < eventTypeCount; ++i)
95 if (eventTypes[i].type == type) 96 if (eventTypes[i].type == type)
96 return i; 97 return i;
97 error("Unknown event type %08lX", type); 98 error("Unknown event type %0"PRIwLONGEST PRIXLONGEST, (ulongest_t)type);
98 return 0; 99 return 0;
99} 100}
100 101
@@ -109,7 +110,7 @@ static size_t eventCode2Index(EventCode code, Bool errorp)
109 if (eventTypes[i].code == code) 110 if (eventTypes[i].code == code)
110 return i; 111 return i;
111 if (errorp) 112 if (errorp)
112 error("Unknown event code %08lX", code); 113 error("Unknown event code %0"PRIwLONGEST PRIXLONGEST, (ulongest_t)code);
113 return 0; 114 return 0;
114} 115}
115 116
diff --git a/mps/code/libcbt.c b/mps/code/libcbt.c
index 9090eb8a6d5..7e13734ecf8 100644
--- a/mps/code/libcbt.c
+++ b/mps/code/libcbt.c
@@ -42,7 +42,7 @@ int main(void)
42 die(mps_lib_callback_register("mps_clock", 42 die(mps_lib_callback_register("mps_clock",
43 (mps_lib_function_t)libcbt_clock), 43 (mps_lib_function_t)libcbt_clock),
44 "register clock"); 44 "register clock");
45 die(mps_arena_create(&arena, mps_arena_class_vm(), 1000*1000), 45 die(mps_arena_create(&arena, mps_arena_class_vm(), (size_t)1000*1000),
46 "mps_arena_create"); 46 "mps_arena_create");
47 if(defects) { 47 if(defects) {
48 printf("Conclusion: Defects detected.\n"); 48 printf("Conclusion: Defects detected.\n");
diff --git a/mps/code/locusss.c b/mps/code/locusss.c
index 58689adea8a..f3828404c0b 100644
--- a/mps/code/locusss.c
+++ b/mps/code/locusss.c
@@ -160,12 +160,12 @@ static void testInArena(mps_arena_t arena,
160 int i; 160 int i;
161 161
162 die(mps_pool_create(&hipool, arena, mps_class_mvff(), 162 die(mps_pool_create(&hipool, arena, mps_class_mvff(),
163 chunkSize, chunkSize, 1024, 163 chunkSize, chunkSize, (size_t)1024,
164 TRUE, TRUE, TRUE), 164 TRUE, TRUE, TRUE),
165 "Create HI MFFV"); 165 "Create HI MFFV");
166 166
167 die(mps_pool_create(&lopool, arena, mps_class_mvff(), 167 die(mps_pool_create(&lopool, arena, mps_class_mvff(),
168 chunkSize, chunkSize, 1024, 168 chunkSize, chunkSize, (size_t)1024,
169 FALSE, FALSE, TRUE), 169 FALSE, FALSE, TRUE),
170 "Create LO MFFV"); 170 "Create LO MFFV");
171 171
diff --git a/mps/code/mpsicv.c b/mps/code/mpsicv.c
index b7c315a7e65..f2d3aa6f2da 100644
--- a/mps/code/mpsicv.c
+++ b/mps/code/mpsicv.c
@@ -102,7 +102,8 @@ static void alignmentTest(mps_arena_t arena)
102 int dummy = 0; 102 int dummy = 0;
103 size_t j, size; 103 size_t j, size;
104 104
105 die(mps_pool_create(&pool, arena, mps_class_mv(), 0x1000, 1024, 16384), 105 die(mps_pool_create(&pool, arena, mps_class_mv(),
106 (size_t)0x1000, (size_t)1024, (size_t)16384),
106 "alignment pool create"); 107 "alignment pool create");
107 size = max(sizeof(double), sizeof(long)); 108 size = max(sizeof(double), sizeof(long));
108#ifdef HAS_LONG_LONG 109#ifdef HAS_LONG_LONG
@@ -336,7 +337,8 @@ static void arena_commit_test(mps_arena_t arena)
336 committed = mps_arena_committed(arena); 337 committed = mps_arena_committed(arena);
337 reserved = mps_arena_reserved(arena); 338 reserved = mps_arena_reserved(arena);
338 cdie(reserved >= committed, "reserved < committed"); 339 cdie(reserved >= committed, "reserved < committed");
339 die(mps_pool_create(&pool, arena, mps_class_mv(), 0x1000, 1024, 16384), 340 die(mps_pool_create(&pool, arena, mps_class_mv(),
341 (size_t)0x1000, (size_t)1024, (size_t)16384),
340 "commit pool create"); 342 "commit pool create");
341 limit = mps_arena_commit_limit(arena); 343 limit = mps_arena_commit_limit(arena);
342 die(mps_arena_commit_limit_set(arena, committed), "commit_limit_set before"); 344 die(mps_arena_commit_limit_set(arena, committed), "commit_limit_set before");
@@ -411,7 +413,8 @@ static void *test(void *arg, size_t s)
411 413
412 die(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); 414 die(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create");
413 415
414 die(mps_pool_create(&mv, arena, mps_class_mv(), 0x10000, 32, 0x10000), 416 die(mps_pool_create(&mv, arena, mps_class_mv(),
417 (size_t)0x10000, (size_t)32, (size_t)0x10000),
415 "pool_create(mv)"); 418 "pool_create(mv)");
416 419
417 pool_create_v_test(arena, format, chain); /* creates amc pool */ 420 pool_create_v_test(arena, format, chain); /* creates amc pool */