1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-30 09:00:31 -08:00

Merging from master/... to bring over extra vararg fixes

Copied from Perforce
 Change: 178079
 ServerID: perforce.ravenbrook.com
This commit is contained in:
David Lovemore 2012-05-01 17:12:07 +01:00
commit e9692d8c0a
5 changed files with 13 additions and 9 deletions

View file

@ -146,7 +146,7 @@ int main(int argc, char *argv[]) {
switch(header[0]) {
#include "eventdef.h"
default:
error("Unknown event code %08lX", header[0]);
error("Unknown event code %"PRIXPTR, (ulongest_t)header[0]);
}
}
} while(arg < argc);

View file

@ -14,6 +14,7 @@
#include "eventpro.h"
#include "misc.h"
#include "mpmtypes.h"
#include "testlib.h" /* for ulongest_t and associated print formats */
#include <assert.h> /* assert */
#include <stdlib.h> /* size_t */
@ -94,7 +95,7 @@ static size_t eventType2Index(EventType type)
for(i = 0; i < eventTypeCount; ++i)
if (eventTypes[i].type == type)
return i;
error("Unknown event type %08lX", type);
error("Unknown event type %0"PRIwLONGEST PRIXLONGEST, (ulongest_t)type);
return 0;
}
@ -109,7 +110,7 @@ static size_t eventCode2Index(EventCode code, Bool errorp)
if (eventTypes[i].code == code)
return i;
if (errorp)
error("Unknown event code %08lX", code);
error("Unknown event code %0"PRIwLONGEST PRIXLONGEST, (ulongest_t)code);
return 0;
}

View file

@ -42,7 +42,7 @@ int main(void)
die(mps_lib_callback_register("mps_clock",
(mps_lib_function_t)libcbt_clock),
"register clock");
die(mps_arena_create(&arena, mps_arena_class_vm(), 1000*1000),
die(mps_arena_create(&arena, mps_arena_class_vm(), (size_t)1000*1000),
"mps_arena_create");
if(defects) {
printf("Conclusion: Defects detected.\n");

View file

@ -160,12 +160,12 @@ static void testInArena(mps_arena_t arena,
int i;
die(mps_pool_create(&hipool, arena, mps_class_mvff(),
chunkSize, chunkSize, 1024,
chunkSize, chunkSize, (size_t)1024,
TRUE, TRUE, TRUE),
"Create HI MFFV");
die(mps_pool_create(&lopool, arena, mps_class_mvff(),
chunkSize, chunkSize, 1024,
chunkSize, chunkSize, (size_t)1024,
FALSE, FALSE, TRUE),
"Create LO MFFV");

View file

@ -102,7 +102,8 @@ static void alignmentTest(mps_arena_t arena)
int dummy = 0;
size_t j, size;
die(mps_pool_create(&pool, arena, mps_class_mv(), 0x1000, 1024, 16384),
die(mps_pool_create(&pool, arena, mps_class_mv(),
(size_t)0x1000, (size_t)1024, (size_t)16384),
"alignment pool create");
size = max(sizeof(double), sizeof(long));
#ifdef HAS_LONG_LONG
@ -336,7 +337,8 @@ static void arena_commit_test(mps_arena_t arena)
committed = mps_arena_committed(arena);
reserved = mps_arena_reserved(arena);
cdie(reserved >= committed, "reserved < committed");
die(mps_pool_create(&pool, arena, mps_class_mv(), 0x1000, 1024, 16384),
die(mps_pool_create(&pool, arena, mps_class_mv(),
(size_t)0x1000, (size_t)1024, (size_t)16384),
"commit pool create");
limit = mps_arena_commit_limit(arena);
die(mps_arena_commit_limit_set(arena, committed), "commit_limit_set before");
@ -411,7 +413,8 @@ static void *test(void *arg, size_t s)
die(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create");
die(mps_pool_create(&mv, arena, mps_class_mv(), 0x10000, 32, 0x10000),
die(mps_pool_create(&mv, arena, mps_class_mv(),
(size_t)0x10000, (size_t)32, (size_t)0x10000),
"pool_create(mv)");
pool_create_v_test(arena, format, chain); /* creates amc pool */