diff options
| -rw-r--r-- | CMakeLists.txt | 1 | ||||
| -rw-r--r-- | src/tags/heavy_keeper.c | 5 | ||||
| -rw-r--r-- | src/tags/sorted_set.c | 5 |
3 files changed, 9 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6123eb4..4c2d6f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,6 +61,7 @@ if (CMAKE_CXX_CPPCHECK) "--suppress=shadowFunction"
"--suppress=shiftTooManyBitsSigned"
"--suppress=preprocessorErrorDirective"
+ "--suppress=nullPointer"
"--inline-suppr"
"--suppress=*:${PROJECT_SOURCE_DIR}/vendors/*"
"--suppress=*:${PROJECT_SOURCE_DIR}/test/utils.hpp"
diff --git a/src/tags/heavy_keeper.c b/src/tags/heavy_keeper.c index 5280cc0..877b73d 100644 --- a/src/tags/heavy_keeper.c +++ b/src/tags/heavy_keeper.c @@ -18,7 +18,10 @@ #include "tags/sorted_set.h" #include "tags/my_ut_hash.h" -#define assert(s) do { if (!(s)) { printf("assert failed: %s\n", #s); exit(1); } } while (0) +#define assert(s) do { if (!(s)) { printf("assert failed: %s\n", #s); \ + *((int *)0) = 0; \ + } \ + } while (0) struct Bucket { unsigned int finger_print; diff --git a/src/tags/sorted_set.c b/src/tags/sorted_set.c index b4f6d39..febd405 100644 --- a/src/tags/sorted_set.c +++ b/src/tags/sorted_set.c @@ -11,7 +11,10 @@ #include "sorted_set.h"
#include "my_ut_hash.h"
-#define assert(s) do { if (!(s)) { printf("assert failed: %s\n", #s); exit(1); } } while (0)
+#define assert(s) do { if (!(s)) { printf("assert failed: %s\n", #s); \
+ *((int *)0) = 0; \
+ } \
+ } while (0)
struct entry_data {
struct tag_hash_key *key;
|
