1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-11-10 19:08:21 +01:00

(mi_init): Use assertion instead of relying on compiler-optimization

to verify that unw_cursor_t is big enough to contain a
	cursor.

(Logical change 1.207)
This commit is contained in:
mostang.com!davidm 2004-04-20 23:46:44 +00:00
parent 2212940f59
commit db24e76397

View file

@ -23,6 +23,7 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#include <assert.h>
#include <stdlib.h>
#include "internal.h"
@ -46,7 +47,6 @@ long unwi_debug_level;
HIDDEN void
mi_init (void)
{
extern void unw_cursor_t_is_too_small (void);
#if UNW_DEBUG
const char *str = getenv ("UNW_DEBUG_LEVEL");
@ -60,6 +60,5 @@ mi_init (void)
}
#endif
if (sizeof (struct cursor) > sizeof (unw_cursor_t))
unw_cursor_t_is_too_small ();
assert (sizeof (struct cursor) <= sizeof (unw_cursor_t));
}