]> granicus.if.org Git - graphviz/commitdiff
general.h: stop disabling assertions when 'DEBUG' is undefined
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 10 Nov 2021 01:49:41 +0000 (17:49 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 14 Nov 2021 19:01:19 +0000 (11:01 -0800)
The effect of this code was that #including general.h prior to assert.h would
disable assertions in your code. Not #including general.h or #including it after
assert.h would allow assertions to be controlled through the standard `NDEBUG`
mechanism. It is not clear why suppressing assertions like this was ever
desirable.

This is basically another variant of commit
68bcbbd4ddef4960c7ea6884dda10854b0e012e0.

lib/sparse/general.h

index fee536d1f4de982b8bf30c05ac6a0364dd1227b2..9e2efad7953c9c96479733ed2fc320a06257235c 100644 (file)
@@ -66,12 +66,6 @@ extern unsigned char Verbose;
 #define REALLOC grealloc
 #endif    /* STANDALONE */
 
-#ifndef DEBUG
-#ifndef NDEBUG
-#define NDEBUG /* switch off assert*/
-#endif
-#endif
-
 #ifdef DEBUG
 extern double _statistics[10];
 #endif