From: Matthew Fernandez Date: Sun, 12 Jul 2020 03:07:52 +0000 (-0700) Subject: remove no longer used Assert() X-Git-Tag: 2.46.0~20^2^2~179^2~1^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b1d16ddf9a5df8a2ec34b867bd7edd81f05abc8d;p=graphviz remove no longer used Assert() Related to #1742. --- diff --git a/lib/rbtree/misc.c b/lib/rbtree/misc.c index 785ba8d72..413db21a4 100644 --- a/lib/rbtree/misc.c +++ b/lib/rbtree/misc.c @@ -12,33 +12,6 @@ jmp_buf rb_jbuf; -/***********************************************************************/ -/* FUNCTION: void Assert(int assertion, char* error) */ -/**/ -/* INPUTS: assertion should be a predicated that the programmer */ -/* assumes to be true. If this assumption is not true the message */ -/* error is printed and the program exits. */ -/**/ -/* OUTPUT: None. */ -/**/ -/* Modifies input: none */ -/**/ -/* Note: If DEBUG_ASSERT is not defined then assertions should not */ -/* be in use as they will slow down the code. Therefore the */ -/* compiler will complain if an assertion is used when */ -/* DEBUG_ASSERT is undefined. */ -/***********************************************************************/ - - -void Assert(int assertion, char* error) { - if(!assertion) { - fprintf(stderr, "Assertion Failed: %s\n",error); - longjmp(rb_jbuf, 1); - } -} - - - /***********************************************************************/ /* FUNCTION: SafeMalloc */ /**/ diff --git a/lib/rbtree/misc.h b/lib/rbtree/misc.h index 1f1eaa2db..2c97a0e4f 100644 --- a/lib/rbtree/misc.h +++ b/lib/rbtree/misc.h @@ -32,7 +32,6 @@ extern jmp_buf rb_jbuf; /* names beginning with "g". An example of a global */ /* variable name is gNewtonsConstant. */ -void Assert(int assertion, char* error); void * SafeMalloc(size_t size); #ifdef __cplusplus