From 5e39bfee56a4ee494f5b723db3fc8a81b7e320d3 Mon Sep 17 00:00:00 2001 From: Gareth Rees Date: Mon, 7 Sep 2015 21:47:49 +0100 Subject: [PATCH] Avoid char_bit by using sizeof. Copied from Perforce Change: 188279 ServerID: perforce.ravenbrook.com --- mps/code/tagtest.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mps/code/tagtest.c b/mps/code/tagtest.c index c1c74052cf4..fa606fe85d7 100644 --- a/mps/code/tagtest.c +++ b/mps/code/tagtest.c @@ -8,7 +8,6 @@ * scanning. */ -#include /* CHAR_BIT */ #include /* printf */ #include "mpm.h" @@ -245,14 +244,14 @@ static void test(int mode, void *marker) int main(int argc, char *argv[]) { void *marker = ▮ - mps_word_t tags[MPS_WORD_WIDTH / CHAR_BIT]; + mps_word_t tags[sizeof(mps_word_t)]; size_t i; int mode; testlib_init(argc, argv); /* Work out how many tags to use. */ - tag_bits = SizeLog2(MPS_WORD_WIDTH / CHAR_BIT); + tag_bits = SizeLog2(sizeof(mps_word_t)); Insist(TAG_COUNT <= NELEMS(tags)); /* Shuffle the tags. */