From 8c5bb6ae3c4bbae292ffb5e8231e18381cab34fe Mon Sep 17 00:00:00 2001 From: Gareth Rees Date: Sun, 30 Mar 2014 14:26:02 +0100 Subject: [PATCH] Turn on -wunreachable-code for gcc and clang. Remove unreachable code: * No need to have different debug options or structured allocation classes for different platforms. * Don't use STATISTIC_BEGIN, use STATISTIC_STAT. * #ifdef away the unused code in zmess.c for testing ControlAlloc failure. * Remove unused code from the example Scheme interpreter. Copied from Perforce Change: 185089 ServerID: perforce.ravenbrook.com --- mps/code/apss.c | 18 ++----- mps/code/gc.gmk | 26 ++++++--- mps/code/ll.gmk | 27 +++++++--- mps/code/mpm.h | 7 --- mps/code/mpmss.c | 16 ++---- mps/code/mps.xcodeproj/project.pbxproj | 75 +++++++++++--------------- mps/code/poolamc.c | 24 ++++----- mps/code/sacss.c | 30 ++++------- mps/code/trace.c | 11 ++-- mps/code/zmess.c | 9 +++- mps/example/scheme/scheme-advanced.c | 4 -- mps/example/scheme/scheme-boehm.c | 6 +-- mps/example/scheme/scheme-malloc.c | 6 +-- mps/example/scheme/scheme.c | 4 -- 14 files changed, 115 insertions(+), 148 deletions(-) diff --git a/mps/code/apss.c b/mps/code/apss.c index 04818600510..6e4c7f3a71b 100644 --- a/mps/code/apss.c +++ b/mps/code/apss.c @@ -122,16 +122,9 @@ static size_t randomSizeAligned(size_t i) } -static mps_pool_debug_option_s bothOptions8 = { - /* .fence_template = */ (const void *)"postpost", - /* .fence_size = */ 8, - /* .free_template = */ (const void *)"DEAD", - /* .free_size = */ 4 -}; - -static mps_pool_debug_option_s bothOptions16 = { +static mps_pool_debug_option_s bothOptions = { /* .fence_template = */ (const void *)"postpostpostpost", - /* .fence_size = */ 16, + /* .fence_size = */ MPS_PF_ALIGN, /* .free_template = */ (const void *)"DEAD", /* .free_size = */ 4 }; @@ -181,9 +174,6 @@ static void testInArena(mps_arena_t arena, mps_pool_debug_option_s *options) int main(int argc, char *argv[]) { mps_arena_t arena; - mps_pool_debug_option_s *bothOptions; - - bothOptions = MPS_PF_ALIGN == 8 ? &bothOptions8 : &bothOptions16; testlib_init(argc, argv); @@ -200,7 +190,7 @@ int main(int argc, char *argv[]) die(mps_arena_create_k(&arena, mps_arena_class_vm(), args), "mps_arena_create"); } MPS_ARGS_END(args); - testInArena(arena, bothOptions); + testInArena(arena, &bothOptions); mps_arena_destroy(arena); MPS_ARGS_BEGIN(args) { @@ -210,7 +200,7 @@ int main(int argc, char *argv[]) die(mps_arena_create_k(&arena, mps_arena_class_cl(), args), "mps_arena_create"); } MPS_ARGS_END(args); - testInArena(arena, bothOptions); + testInArena(arena, &bothOptions); mps_arena_destroy(arena); printf("%s: Conclusion: Failed to find any defects.\n", argv[0]); diff --git a/mps/code/gc.gmk b/mps/code/gc.gmk index 8ff258c9cf3..e6bd343f11b 100644 --- a/mps/code/gc.gmk +++ b/mps/code/gc.gmk @@ -3,7 +3,7 @@ # gc.gmk: GNUMAKEFILE FRAGMENT FOR GNU CC # # $Id$ -# Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. +# Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license. # # This file is included by platform makefiles that use the GNU CC # compiler. It defines the compiler-specific variables that the @@ -12,11 +12,23 @@ CC = gcc CFLAGSDEBUG = -O -g3 CFLAGSOPT = -O2 -g3 -CFLAGSCOMPILER := -Wall -Wextra -Werror -Wpointer-arith \ - -Wstrict-prototypes -Wmissing-prototypes \ - -Winline -Waggregate-return -Wnested-externs \ - -Wcast-qual -Wshadow -Wwrite-strings # -Wstrict-aliasing=2 -CFLAGSCOMPILERSTRICT := -ansi -pedantic -Wshadow +CFLAGSCOMPILER := \ + -pedantic \ + -Waggregate-return \ + -Wall \ + -Wcast-qual \ + -Werror \ + -Wextra \ + -Winline \ + -Wmissing-prototypes \ + -Wnested-externs \ + -Wpointer-arith \ + -Wshadow \ + -Wstrict-aliasing=2 \ + -Wstrict-prototypes \ + -Wunreachable-code \ + -Wwrite-strings +CFLAGSCOMPILERSTRICT := -ansi # A different set of compiler flags for less strict compilation, for # instance when we need to #include a third-party header file that @@ -38,7 +50,7 @@ endef # C. COPYRIGHT AND LICENSE # -# Copyright (C) 2001-2013 Ravenbrook Limited . +# Copyright (C) 2001-2014 Ravenbrook Limited . # All rights reserved. This is an open source license. Contact # Ravenbrook for commercial licensing options. # diff --git a/mps/code/ll.gmk b/mps/code/ll.gmk index fd91e62fe42..dc2595c511f 100644 --- a/mps/code/ll.gmk +++ b/mps/code/ll.gmk @@ -3,7 +3,7 @@ # ll.gmk: GNUMAKEFILE FRAGMENT FOR CLANG/LLVM # # $Id$ -# Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. +# Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license. # # This file is included by platform makefiles that use the Clang/LLVM # compiler. It defines the compiler-specific variables that the @@ -12,11 +12,24 @@ CC = clang CFLAGSDEBUG = -O -g3 CFLAGSOPT = -O2 -g3 -CFLAGSCOMPILER := -Wall -Werror -Wpointer-arith \ - -Wstrict-prototypes -Wmissing-prototypes \ - -Winline -Waggregate-return -Wnested-externs \ - -Wcast-qual -Wshadow # -Wstrict-aliasing=2 -CFLAGSCOMPILERSTRICT := -pedantic -Wno-extended-offsetof +CFLAGSCOMPILER := \ + -pedantic \ + -Waggregate-return \ + -Wall \ + -Wcast-qual \ + -Werror \ + -Wextra \ + -Winline \ + -Wmissing-prototypes \ + -Wnested-externs \ + -Wno-extended-offsetof \ + -Wpointer-arith \ + -Wshadow \ + -Wstrict-aliasing=2 \ + -Wstrict-prototypes \ + -Wunreachable-code \ + -Wwrite-strings +CFLAGSCOMPILERSTRICT := # A different set of compiler flags for less strict compilation, for # instance when we need to #include a third-party header file that @@ -38,7 +51,7 @@ endef # C. COPYRIGHT AND LICENSE # -# Copyright (C) 2001-2013 Ravenbrook Limited . +# Copyright (C) 2001-2014 Ravenbrook Limited . # All rights reserved. This is an open source license. Contact # Ravenbrook for commercial licensing options. # diff --git a/mps/code/mpm.h b/mps/code/mpm.h index 46dcd74b880..da45d9aedd2 100644 --- a/mps/code/mpm.h +++ b/mps/code/mpm.h @@ -1008,9 +1008,6 @@ extern void StackProbe(Size depth); * STATISTIC_WRITE is inserted in WriteF arguments to output the values * of statistic fields. * - * STATISTIC_BEGIN and STATISTIC_END can be used around a block of - * statements. - * * .statistic.whitehot: The implementation of STATISTIC for * non-statistical varieties passes the parameter to DISCARD to ensure * the parameter is syntactically an expression. The parameter is @@ -1022,16 +1019,12 @@ extern void StackProbe(Size depth); #define STATISTIC(gather) BEGIN (gather); END #define STATISTIC_STAT(gather) BEGIN gather; END #define STATISTIC_WRITE(format, arg) (format), (arg), -#define STATISTIC_BEGIN BEGIN -#define STATISTIC_END END #elif defined(STATISTICS_NONE) #define STATISTIC(gather) DISCARD(((gather), 0)) #define STATISTIC_STAT DISCARD_STAT #define STATISTIC_WRITE(format, arg) -#define STATISTIC_BEGIN BEGIN if (0) { -#define STATISTIC_END } END #else /* !defined(STATISTICS) && !defined(STATISTICS_NONE) */ diff --git a/mps/code/mpmss.c b/mps/code/mpmss.c index 547f3d746b6..9dd25574417 100644 --- a/mps/code/mpmss.c +++ b/mps/code/mpmss.c @@ -125,16 +125,9 @@ static size_t fixedSize(size_t i) } -static mps_pool_debug_option_s bothOptions8 = { - /* .fence_template = */ (const void *)"postpost", - /* .fence_size = */ 8, - /* .free_template = */ (const void *)"DEAD", - /* .free_size = */ 4 -}; - -static mps_pool_debug_option_s bothOptions16 = { +static mps_pool_debug_option_s bothOptions = { /* .fence_template = */ (const void *)"postpostpostpost", - /* .fence_size = */ 16, + /* .fence_size = */ MPS_PF_ALIGN, /* .free_template = */ (const void *)"DEAD", /* .free_size = */ 4 }; @@ -177,15 +170,12 @@ static void testInArena(mps_arena_t arena, mps_pool_debug_option_s *options) int main(int argc, char *argv[]) { mps_arena_t arena; - mps_pool_debug_option_s *bothOptions; - - bothOptions = MPS_PF_ALIGN == 8 ? &bothOptions8 : &bothOptions16; testlib_init(argc, argv); die(mps_arena_create(&arena, mps_arena_class_vm(), testArenaSIZE), "mps_arena_create"); - testInArena(arena, bothOptions); + testInArena(arena, &bothOptions); mps_arena_destroy(arena); die(mps_arena_create(&arena, mps_arena_class_vm(), smallArenaSIZE), diff --git a/mps/code/mps.xcodeproj/project.pbxproj b/mps/code/mps.xcodeproj/project.pbxproj index d7865d3d4a6..d9ce4fdd401 100644 --- a/mps/code/mps.xcodeproj/project.pbxproj +++ b/mps/code/mps.xcodeproj/project.pbxproj @@ -4609,29 +4609,24 @@ GCC_WARN_UNUSED_PARAMETER = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.4; - OTHER_CFLAGS = ( - "-pedantic", - "-Wall", - "-Wextra", - "-Wwrite-strings", - "-Wno-extended-offsetof", - ); SDKROOT = macosx; SYMROOT = xc; WARNING_CFLAGS = ( "-pedantic", - "-Wpointer-arith", - "-Wstrict-prototypes", - "-Wmissing-prototypes", - "-Winline", "-Waggregate-return", - "-Wnested-externs", - "-Wcast-qual", - "-Wshadow", "-Wall", + "-Wcast-qual", "-Wextra", - "-Wwrite-strings", + "-Winline", + "-Wmissing-prototypes", + "-Wnested-externs", "-Wno-extended-offsetof", + "-Wpointer-arith", + "-Wshadow", + "-Wstrict-aliasing=2", + "-Wstrict-prototypes", + "-Wunreachable-code", + "-Wwrite-strings", ); }; name = RASH; @@ -5053,29 +5048,24 @@ GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.4; ONLY_ACTIVE_ARCH = YES; - OTHER_CFLAGS = ( - "-pedantic", - "-Wall", - "-Wextra", - "-Wwrite-strings", - "-Wno-extended-offsetof", - ); SDKROOT = macosx; SYMROOT = xc; WARNING_CFLAGS = ( "-pedantic", - "-Wpointer-arith", - "-Wstrict-prototypes", - "-Wmissing-prototypes", - "-Winline", "-Waggregate-return", - "-Wnested-externs", - "-Wcast-qual", - "-Wshadow", "-Wall", + "-Wcast-qual", "-Wextra", - "-Wwrite-strings", + "-Winline", + "-Wmissing-prototypes", + "-Wnested-externs", "-Wno-extended-offsetof", + "-Wpointer-arith", + "-Wshadow", + "-Wstrict-aliasing=2", + "-Wstrict-prototypes", + "-Wunreachable-code", + "-Wwrite-strings", ); }; name = Debug; @@ -5111,29 +5101,24 @@ GCC_WARN_UNUSED_PARAMETER = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.4; - OTHER_CFLAGS = ( - "-pedantic", - "-Wall", - "-Wextra", - "-Wwrite-strings", - "-Wno-extended-offsetof", - ); SDKROOT = macosx; SYMROOT = xc; WARNING_CFLAGS = ( "-pedantic", - "-Wpointer-arith", - "-Wstrict-prototypes", - "-Wmissing-prototypes", - "-Winline", "-Waggregate-return", - "-Wnested-externs", - "-Wcast-qual", - "-Wshadow", "-Wall", + "-Wcast-qual", "-Wextra", - "-Wwrite-strings", + "-Winline", + "-Wmissing-prototypes", + "-Wnested-externs", "-Wno-extended-offsetof", + "-Wpointer-arith", + "-Wshadow", + "-Wstrict-aliasing=2", + "-Wstrict-prototypes", + "-Wunreachable-code", + "-Wwrite-strings", ); }; name = Release; diff --git a/mps/code/poolamc.c b/mps/code/poolamc.c index d7d8e0cbfd1..4e479266b7d 100644 --- a/mps/code/poolamc.c +++ b/mps/code/poolamc.c @@ -2242,18 +2242,18 @@ static void AMCTraceEnd(Pool pool, Trace trace) ti = trace->ti; AVER(TraceIdCheck(ti)); - STATISTIC_BEGIN { - Count pRetMin = 100; - PageRetStruct *pr = &amc->pageretstruct[ti]; - if(pr->pRet >= pRetMin) { - EVENT21(AMCTraceEnd, ArenaEpoch(pool->arena), (EventFU)trace->why, - ArenaAlign(pool->arena), AMCLargeSegPAGES, pRetMin, pr->pCond, - pr->pRet, pr->pCS, pr->pRS, pr->sCM, pr->pCM, pr->sRM, pr->pRM, - pr->pRM1, pr->pRMrr, pr->pRMr1, pr->sCL, pr->pCL, pr->sRL, - pr->pRL, pr->pRLr); - } - *pr = pageretstruct_Zero; - } STATISTIC_END; + STATISTIC_STAT ({ + Count pRetMin = 100; + PageRetStruct *pr = &amc->pageretstruct[ti]; + if(pr->pRet >= pRetMin) { + EVENT21(AMCTraceEnd, ArenaEpoch(pool->arena), (EventFU)trace->why, + ArenaAlign(pool->arena), AMCLargeSegPAGES, pRetMin, pr->pCond, + pr->pRet, pr->pCS, pr->pRS, pr->sCM, pr->pCM, pr->sRM, pr->pRM, + pr->pRM1, pr->pRMrr, pr->pRMr1, pr->sCL, pr->pCL, pr->sRL, + pr->pRL, pr->pRLr); + } + *pr = pageretstruct_Zero; + }); } diff --git a/mps/code/sacss.c b/mps/code/sacss.c index bfb0725ed47..d2300de1898 100644 --- a/mps/code/sacss.c +++ b/mps/code/sacss.c @@ -140,41 +140,29 @@ static size_t randomSize8(size_t i) /* testInArena -- test all the pool classes in the given arena */ -static mps_pool_debug_option_s debugOptions8 = { - /* .fence_template = */ (const void *)"postpost", - /* .fence_size = */ 8, - /* .free_template = */ (const void *)"DEAD", - /* .free_size = */ 4 -}; - -static mps_pool_debug_option_s debugOptions16 = { +static mps_pool_debug_option_s debugOptions = { /* .fence_template = */ (const void *)"postpostpostpost", - /* .fence_size = */ 16, + /* .fence_size = */ MPS_PF_ALIGN, /* .free_template = */ (const void *)"DEAD", /* .free_size = */ 4 }; -static mps_sac_classes_s classes8[4] = { {8, 1, 1}, {16, 1, 2}, {136, 9, 5}, - {topClassSIZE, 9, 4} }; - -static mps_sac_classes_s classes16[4] = { {16, 1, 1}, {32, 1, 2}, {144, 9, 5}, - {topClassSIZE, 9, 4} }; +static mps_sac_classes_s classes[4] = { + {MPS_PF_ALIGN, 1, 1}, + {MPS_PF_ALIGN * 2, 1, 2}, + {128 + MPS_PF_ALIGN, 9, 5}, + {topClassSIZE, 9, 4} +}; static void testInArena(mps_arena_t arena) { - mps_pool_debug_option_s *debugOptions; - mps_sac_classes_s *classes; - - debugOptions = MPS_PF_ALIGN == 8 ? &debugOptions8 : &debugOptions16; - classes = MPS_PF_ALIGN == 8 ? classes8 : classes16; - printf("MVFF\n\n"); die(stress(mps_class_mvff(), classCOUNT, classes, randomSize8, arena, (size_t)65536, (size_t)32, (mps_align_t)MPS_PF_ALIGN, TRUE, TRUE, TRUE), "stress MVFF"); printf("MV debug\n\n"); die(stress(mps_class_mv_debug(), classCOUNT, classes, randomSize8, arena, - debugOptions, (size_t)65536, (size_t)32, (size_t)65536), + &debugOptions, (size_t)65536, (size_t)32, (size_t)65536), "stress MV debug"); printf("MV\n\n"); die(stress(mps_class_mv(), classCOUNT, classes, randomSize8, arena, diff --git a/mps/code/trace.c b/mps/code/trace.c index e77f93cd483..b394ed95e80 100644 --- a/mps/code/trace.c +++ b/mps/code/trace.c @@ -1,7 +1,7 @@ /* trace.c: GENERIC TRACER IMPLEMENTATION * * $Id$ - * Copyright (c) 2001-2013 Ravenbrook Limited. + * Copyright (c) 2001-2014 Ravenbrook Limited. * See end of file for license. * Portions copyright (C) 2002 Global Graphics Software. * @@ -1641,11 +1641,12 @@ Res TraceStart(Trace trace, double mortality, double finishingTime) } while (SegNext(&seg, arena, seg)); } - STATISTIC_BEGIN { + STATISTIC_STAT ({ /* @@ */ /* Iterate over all chains, all GenDescs within a chain, */ /* (and all PoolGens within a GenDesc). */ - Ring node, nextNode; + Ring node; + Ring nextNode; Index i; RING_FOR(node, &arena->chainRing, nextNode) { @@ -1658,7 +1659,7 @@ Res TraceStart(Trace trace, double mortality, double finishingTime) /* Now do topgen GenDesc (and all PoolGens within it). */ TraceStartPoolGen(NULL, &arena->topGen, TRUE, 0); - } STATISTIC_END; + }); res = RootsIterate(ArenaGlobals(arena), rootGrey, (void *)trace); AVER(res == ResOK); @@ -1900,7 +1901,7 @@ failStart: /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2013 Ravenbrook Limited + * Copyright (C) 2001-2014 Ravenbrook Limited * . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. diff --git a/mps/code/zmess.c b/mps/code/zmess.c index 2b6d533dfde..a97c10ea8f1 100644 --- a/mps/code/zmess.c +++ b/mps/code/zmess.c @@ -442,6 +442,9 @@ static void testscriptA(const char *script) * * TIMCA_remote returns a Bool, true for let "ControlAlloc succeed". */ + +#ifdef TEST_CONTROLALLOC_FAILURE + static const char *TIMCA_str = ""; static int TIMCA_done = 0; static void TIMCA_setup(const char *string) @@ -481,6 +484,8 @@ Bool TIMCA_remote(void) return succeed; } +#endif /* TEST_CONTROLALLOC_FAILURE */ + /* main -- runs various test scripts * @@ -535,7 +540,8 @@ int main(int argc, char *argv[]) * * See . */ - if(0) { +#if TEST_CONTROLALLOC_FAILURE + { /* ArenaCreate unable to pre-allocate: THESE SHOULD FAIL */ /* manually edit if(0) -> if(1) to test these */ if(0) { @@ -562,6 +568,7 @@ int main(int argc, char *argv[]) TIMCA_setup(""); /* must reset it! */ } +#endif printf("%s: Conclusion: Failed to find any defects.\n", argv[0]); return 0; diff --git a/mps/example/scheme/scheme-advanced.c b/mps/example/scheme/scheme-advanced.c index 22009cf2323..476b790f0a4 100644 --- a/mps/example/scheme/scheme-advanced.c +++ b/mps/example/scheme/scheme-advanced.c @@ -2011,8 +2011,6 @@ static obj_t entry_do(obj_t env, obj_t op_env, obj_t operator, obj_t operands) return result; } } - error("%s: unimplemented", operator->operator.name); - return obj_error; } @@ -4007,7 +4005,6 @@ static mps_res_t obj_scan(mps_ss_t ss, mps_addr_t base, mps_addr_t limit) assert(0); fprintf(stderr, "Unexpected object on the heap\n"); abort(); - return MPS_RES_FAIL; } } } MPS_SCAN_END(ss); @@ -4078,7 +4075,6 @@ static mps_addr_t obj_skip(mps_addr_t base) assert(0); fprintf(stderr, "Unexpected object on the heap\n"); abort(); - return NULL; } return base; } diff --git a/mps/example/scheme/scheme-boehm.c b/mps/example/scheme/scheme-boehm.c index 839f1a56fd3..8d039433bb4 100644 --- a/mps/example/scheme/scheme-boehm.c +++ b/mps/example/scheme/scheme-boehm.c @@ -1,6 +1,6 @@ /* scheme.c -- SCHEME INTERPRETER EXAMPLE FOR THE MEMORY POOL SYSTEM * - * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license. * * TO DO * - unbounded integers, other number types. @@ -1728,8 +1728,6 @@ static obj_t entry_do(obj_t env, obj_t op_env, obj_t operator, obj_t operands) return result; } } - error("%s: unimplemented", operator->operator.name); - return obj_error; } @@ -3638,7 +3636,7 @@ int main(int argc, char *argv[]) /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2013 Ravenbrook Limited . + * Copyright (C) 2001-2014 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * diff --git a/mps/example/scheme/scheme-malloc.c b/mps/example/scheme/scheme-malloc.c index 799e7db66cf..1333ce73aef 100644 --- a/mps/example/scheme/scheme-malloc.c +++ b/mps/example/scheme/scheme-malloc.c @@ -1,6 +1,6 @@ /* scheme.c -- SCHEME INTERPRETER EXAMPLE FOR THE MEMORY POOL SYSTEM * - * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license. * * TO DO * - unbounded integers, other number types. @@ -1728,8 +1728,6 @@ static obj_t entry_do(obj_t env, obj_t op_env, obj_t operator, obj_t operands) return result; } } - error("%s: unimplemented", operator->operator.name); - return obj_error; } @@ -3635,7 +3633,7 @@ int main(int argc, char *argv[]) /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2013 Ravenbrook Limited . + * Copyright (C) 2001-2014 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * diff --git a/mps/example/scheme/scheme.c b/mps/example/scheme/scheme.c index 4b2b36797c5..8a8dcf48ed7 100644 --- a/mps/example/scheme/scheme.c +++ b/mps/example/scheme/scheme.c @@ -2037,8 +2037,6 @@ static obj_t entry_do(obj_t env, obj_t op_env, obj_t operator, obj_t operands) return result; } } - error("%s: unimplemented", operator->operator.name); - return obj_error; } @@ -3994,7 +3992,6 @@ static mps_res_t obj_scan(mps_ss_t ss, mps_addr_t base, mps_addr_t limit) assert(0); fprintf(stderr, "Unexpected object on the heap\n"); abort(); - return MPS_RES_FAIL; } } } MPS_SCAN_END(ss); @@ -4071,7 +4068,6 @@ static mps_addr_t obj_skip(mps_addr_t base) assert(0); fprintf(stderr, "Unexpected object on the heap\n"); abort(); - return NULL; } return base; }