From d69585b82abfdaede9e8c358982a4953c432e8d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Thu, 17 Sep 2020 22:27:33 +0200 Subject: Resolve DEBUG compilation issues Use NDEBUG conditional instead of DEBUG. Do not call static functions in extern inline ones. Vector.c:67:11: error: static function 'Vector_isConsistent' is used in an inline function with external linkage [-Werror,-Wstatic-in-inline] --- Hashtable.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Hashtable.c') diff --git a/Hashtable.c b/Hashtable.c index bb9517ad..f8815f93 100644 --- a/Hashtable.c +++ b/Hashtable.c @@ -12,7 +12,7 @@ in the source distribution for its full text. #include -#ifdef DEBUG +#ifndef NDEBUG static bool Hashtable_isConsistent(Hashtable* this) { int items = 0; @@ -39,7 +39,7 @@ int Hashtable_count(Hashtable* this) { return items; } -#endif +#endif /* NDEBUG */ static HashtableItem* HashtableItem_new(unsigned int key, void* value) { HashtableItem* this; @@ -124,7 +124,7 @@ void* Hashtable_remove(Hashtable* this, unsigned int key) { return NULL; } -inline void* Hashtable_get(Hashtable* this, unsigned int key) { +void* Hashtable_get(Hashtable* this, unsigned int key) { unsigned int index = key % this->size; HashtableItem* bucketPtr = this->buckets[index]; while (true) { -- cgit v1.2.3