diff --git a/source/blender/blenkernel/intern/mesh_wrapper.c b/source/blender/blenkernel/intern/mesh_wrapper.c index f073feffedc..8460c0c43c6 100644 --- a/source/blender/blenkernel/intern/mesh_wrapper.c +++ b/source/blender/blenkernel/intern/mesh_wrapper.c @@ -162,5 +162,5 @@ bool BKE_mesh_wrapper_minmax(const Mesh *me, float min[3], float max[3]) return BKE_mesh_minmax(me, min, max); } BLI_assert(0); - return false; + //return false; } diff --git a/source/blender/blenlib/BLI_assert.h b/source/blender/blenlib/BLI_assert.h index b9cb32a310e..bfc6fa8f7dd 100644 --- a/source/blender/blenlib/BLI_assert.h +++ b/source/blender/blenlib/BLI_assert.h @@ -69,7 +69,7 @@ extern "C" { # endif /* _BLI_ASSERT_ABORT */ # ifdef WITH_ASSERT_ABORT -# define _BLI_ASSERT_ABORT abort +# define _BLI_ASSERT_ABORT BLI_abort # else # define _BLI_ASSERT_ABORT() (void)0 # endif diff --git a/source/blender/blenlib/BLI_system.h b/source/blender/blenlib/BLI_system.h index 50f8adc20f6..e955c59e55d 100644 --- a/source/blender/blenlib/BLI_system.h +++ b/source/blender/blenlib/BLI_system.h @@ -50,6 +50,14 @@ void BLI_hostname_get(char *buffer, size_t bufsize); size_t BLI_system_memory_max_in_megabytes(void); int BLI_system_memory_max_in_megabytes_int(void); +/** + * BLI_abort + * + * This function wraps the abort function but loses the noreturn attribute + * so warnings about missing returns are still generated. + */ +void BLI_abort(void); + /* getpid */ #ifdef WIN32 # define BLI_SYSTEM_PID_H diff --git a/source/blender/blenlib/intern/system.c b/source/blender/blenlib/intern/system.c index 53db49aa59c..4686270e196 100644 --- a/source/blender/blenlib/intern/system.c +++ b/source/blender/blenlib/intern/system.c @@ -190,3 +190,9 @@ int BLI_system_memory_max_in_megabytes_int(void) /* NOTE: The result will fit into integer. */ return (int)min_zz(limit_megabytes, (size_t)INT_MAX); } + +/* Version of abort that does not have the noreturn attribute. */ +void BLI_abort(void) +{ + abort(); +} diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index 09cfe54e94d..dabad87767f 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -147,6 +147,10 @@ static const char *includefiles[] = { /* -------------------------------------------------------------------- */ /** \name Variables * \{ */ +void BLI_abort() +{ + abort(); +} static MemArena *mem_arena = NULL;