1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-05-01 18:52:51 -07:00

Fix the build on windows:

* Alignments need casts to avoid a warning from MSVC.
* MFS has alignment MPS_PF_ALIGN, not sizeof(void *).

Copied from Perforce
 Change: 186477
 ServerID: perforce.ravenbrook.com
This commit is contained in:
Gareth Rees 2014-06-11 11:57:15 +01:00
parent 0901340862
commit 017bdf6b1c
3 changed files with 8 additions and 8 deletions

View file

@ -153,14 +153,14 @@ static void testInArena(mps_arena_t arena, mps_pool_debug_option_s *options)
/* yet (MV Debug works here, because it fakes it through PoolAlloc). */
MPS_ARGS_BEGIN(args) {
mps_align_t align = 1 << (rnd() % 6);
mps_align_t align = (mps_align_t)1 << (rnd() % 6);
MPS_ARGS_ADD(args, MPS_KEY_ALIGN, align);
die(stress(arena, align, randomSizeAligned, "MV", mps_class_mv(), args),
"stress MV");
} MPS_ARGS_END(args);
MPS_ARGS_BEGIN(args) {
mps_align_t align = 1 << (rnd() % 6);
mps_align_t align = (mps_align_t)1 << (rnd() % 6);
MPS_ARGS_ADD(args, MPS_KEY_ALIGN, align);
MPS_ARGS_ADD(args, MPS_KEY_POOL_DEBUG_OPTIONS, options);
die(stress(arena, align, randomSizeAligned, "MV debug",

View file

@ -166,14 +166,14 @@ static void testInArena(mps_arena_class_t arena_class, mps_arg_s *arena_args,
} MPS_ARGS_END(args);
MPS_ARGS_BEGIN(args) {
mps_align_t align = 1 << (rnd() % 6);
mps_align_t align = (mps_align_t)1 << (rnd() % 6);
MPS_ARGS_ADD(args, MPS_KEY_ALIGN, align);
die(stress(arena, randomSize, "MV", mps_class_mv(), args),
"stress MV");
} MPS_ARGS_END(args);
MPS_ARGS_BEGIN(args) {
mps_align_t align = 1 << (rnd() % 6);
mps_align_t align = (mps_align_t)1 << (rnd() % 6);
MPS_ARGS_ADD(args, MPS_KEY_ALIGN, align);
MPS_ARGS_ADD(args, MPS_KEY_POOL_DEBUG_OPTIONS, options);
die(stress(arena, randomSize, "MV debug", mps_class_mv_debug(), args),

View file

@ -56,7 +56,7 @@ static mps_res_t stress(mps_arena_t arena, mps_align_t align,
{1, 1, 1},
{2, 1, 2},
{16, 9, 5},
{100, 9, 4}
{100, 9, 4},
};
size_t classes_count = sizeof classes / sizeof *classes;
for (i = 0; i < classes_count; ++i) {
@ -196,14 +196,14 @@ static void testInArena(mps_arena_class_t arena_class, mps_arg_s *arena_args)
} MPS_ARGS_END(args);
MPS_ARGS_BEGIN(args) {
mps_align_t align = 1 << (rnd() % 6);
mps_align_t align = (mps_align_t)1 << (rnd() % 6);
MPS_ARGS_ADD(args, MPS_KEY_ALIGN, align);
die(stress(arena, align, randomSize, "MV", mps_class_mv(), args),
"stress MV");
} MPS_ARGS_END(args);
MPS_ARGS_BEGIN(args) {
mps_align_t align = 1 << (rnd() % 6);
mps_align_t align = (mps_align_t)1 << (rnd() % 6);
MPS_ARGS_ADD(args, MPS_KEY_ALIGN, align);
MPS_ARGS_ADD(args, MPS_KEY_POOL_DEBUG_OPTIONS, &debugOptions);
die(stress(arena, align, randomSize, "MV debug",
@ -212,7 +212,7 @@ static void testInArena(mps_arena_class_t arena_class, mps_arg_s *arena_args)
} MPS_ARGS_END(args);
MPS_ARGS_BEGIN(args) {
fixedSizeSize = sizeof(void *) * (1 + rnd() % 100);
fixedSizeSize = MPS_PF_ALIGN * (1 + rnd() % 100);
MPS_ARGS_ADD(args, MPS_KEY_MFS_UNIT_SIZE, fixedSizeSize);
die(stress(arena, fixedSizeSize, fixedSize, "MFS", mps_class_mfs(), args),
"stress MFS");