diff --git a/src/backend/filedescriptor.c b/src/backend/filedescriptor.c index 5ab30eba8..64ab6c01b 100644 --- a/src/backend/filedescriptor.c +++ b/src/backend/filedescriptor.c @@ -298,7 +298,7 @@ lumiera_filedescriptor_delete (LumieraFiledescriptor self, const char* name) if (self->handle && name && ((self->flags & O_RDWR) == O_RDWR)) { - TRACE (filedescriptor_dbg, "truncate %s to %lld", name, self->realsize); + TRACE (filedescriptor_dbg, "truncate %s to %lld", name, (long long)self->realsize); lumiera_filehandlecache_checkout (lumiera_fhcache, self->handle); int dummy = ftruncate (lumiera_filehandle_handle (self->handle), self->realsize); (void) dummy; /* this is present to silence a warning */ diff --git a/src/backend/mmapings.c b/src/backend/mmapings.c index ebf0c12db..3e052ce91 100644 --- a/src/backend/mmapings.c +++ b/src/backend/mmapings.c @@ -121,7 +121,7 @@ lumiera_mmapings_mmap_acquire (LumieraMMapings self, LumieraFile file, LList acq else { /* create new mmap */ - TRACE (mmapings_dbg, "mmap not found, creating", mmap); + TRACE (mmapings_dbg, "mmap not found, creating"); ret = lumiera_mmap_new (file, start, size); llist_insert_head (&self->mmaps, &ret->searchnode); diff --git a/src/lib/condition.h b/src/lib/condition.h index a2e02cebd..f90d079d8 100644 --- a/src/lib/condition.h +++ b/src/lib/condition.h @@ -52,7 +52,7 @@ ({ \ lumiera_cond_section_.lock = (cnd); \ NOBUG_IF_ALPHA(lumiera_cond_section_.flag = &NOBUG_FLAG(nobugflag);) \ - RESOURCE_ENTER (nobugflag, (cnd)->rh, "acquire condmutex", &lumiera_cond_section_, \ + RESOURCE_ENTER (nobugflag, (cnd)->rh, "acquire condmutex", \ NOBUG_RESOURCE_WAITING, lumiera_cond_section_.rh); \ if (pthread_mutex_lock (&(cnd)->cndmutex)) \ LUMIERA_DIE (LOCK_ACQUIRE); \ @@ -74,7 +74,7 @@ REQUIRE (lumiera_lock_section_old_->lock, "section prematurely unlocked"); \ lumiera_cond_section_.lock = cnd; \ NOBUG_IF_ALPHA(lumiera_cond_section_.flag = &NOBUG_FLAG(nobugflag);) \ - RESOURCE_ENTER (nobugflag, (cnd)->rh, "acquire condmutex", &lumiera_cond_section_, \ + RESOURCE_ENTER (nobugflag, (cnd)->rh, "acquire condmutex", \ NOBUG_RESOURCE_WAITING, lumiera_cond_section_.rh); \ if (pthread_mutex_lock (&(cnd)->cndmutex)) \ LUMIERA_DIE (LOCK_ACQUIRE); \ diff --git a/src/lib/mpool.c b/src/lib/mpool.c index ab0aa4c64..f9b3056c6 100644 --- a/src/lib/mpool.c +++ b/src/lib/mpool.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include "mpool.h" @@ -136,7 +137,7 @@ mpool_destroy (MPool self) if (bitmap_bit_get_nth ((MPoolcluster)cluster, i)) { void* obj = cluster_element_get ((MPoolcluster)cluster, self, i); - TRACE (mpool_dbg, "dtor: cluster %p: obj %p: freelist %p", cluster, obj, self->freelist); + TRACE (mpool_dbg, "dtor: cluster %p: obj %p: freelist %p", cluster, obj, &self->freelist); self->destroy (obj); } } @@ -279,7 +280,7 @@ bitmap_set_element (MPoolcluster cluster, MPool self, void* element) uintptr_t* bitmap = (uintptr_t*)&cluster->data; bitmap[quot] |= ((uintptr_t)1<data; bitmap[quot] &= ~((uintptr_t)1< 2) { - DUMP_LOG (" clusters %p: ", self->clusters); + DUMP_LOG (" clusters %p: ", &self->clusters); int i = 0; LLIST_FOREACH (&self->clusters, cluster) DUMP_LOG (" %p: %u", cluster, ++i); @@ -500,7 +501,7 @@ nobug_mpool_dump (const_MPool self, if (depth > 3) { - DUMP_LOG (" freelist %p: ", self->freelist); + DUMP_LOG (" freelist %p: ", &self->freelist); int i = 0; LLIST_FOREACH (&self->freelist, node) DUMP_LOG (" %p: %u", node, ++i); diff --git a/src/lib/mutex.h b/src/lib/mutex.h index a76707933..cead7dec0 100644 --- a/src/lib/mutex.h +++ b/src/lib/mutex.h @@ -46,7 +46,7 @@ ({ \ lumiera_lock_section_.lock = (mtx); \ NOBUG_IF_ALPHA(lumiera_lock_section_.flag = &NOBUG_FLAG(nobugflag);) \ - RESOURCE_ENTER (nobugflag, (mtx)->rh, "acquire mutex", &lumiera_lock_section_, \ + RESOURCE_ENTER (nobugflag, (mtx)->rh, "acquire mutex", \ NOBUG_RESOURCE_WAITING, lumiera_lock_section_.rh); \ if (pthread_mutex_lock (&(mtx)->mutex)) \ LUMIERA_DIE (LOCK_ACQUIRE); \ @@ -76,7 +76,7 @@ REQUIRE (lumiera_lock_section_old_->lock, "section prematurely unlocked"); \ lumiera_lock_section_.lock = mtx; \ NOBUG_IF_ALPHA(lumiera_lock_section_.flag = &NOBUG_FLAG(nobugflag);) \ - RESOURCE_ENTER (nobugflag, (mtx)->rh, "acquire mutex", &lumiera_lock_section_, \ + RESOURCE_ENTER (nobugflag, (mtx)->rh, "acquire mutex", \ NOBUG_RESOURCE_WAITING, lumiera_lock_section_.rh); \ if (pthread_mutex_lock (&(mtx)->mutex)) \ LUMIERA_DIE (LOCK_ACQUIRE); \ diff --git a/src/lib/reccondition.h b/src/lib/reccondition.h index dcf4e33a4..8ba3479ac 100644 --- a/src/lib/reccondition.h +++ b/src/lib/reccondition.h @@ -50,7 +50,7 @@ ({ \ lumiera_reccond_section_.lock = (cnd); \ NOBUG_IF_ALPHA(lumiera_reccond_section_.flag = &NOBUG_FLAG(nobugflag);) \ - RESOURCE_ENTER (nobugflag, (cnd)->rh, "acquire reccondmutex", &lumiera_reccond_section_, \ + RESOURCE_ENTER (nobugflag, (cnd)->rh, "acquire reccondmutex", \ NOBUG_RESOURCE_WAITING, lumiera_reccond_section_.rh); \ if (pthread_mutex_lock (&(cnd)->reccndmutex)) \ LUMIERA_DIE (LOCK_ACQUIRE); \ @@ -73,7 +73,7 @@ REQUIRE (lumiera_lock_section_old_->lock, "section prematurely unlocked"); \ lumiera_reccond_section_.lock = (cnd); \ NOBUG_IF_ALPHA(lumiera_reccond_section_.flag = &NOBUG_FLAG(nobugflag);) \ - RESOURCE_ENTER (nobugflag, (cnd)->rh, "acquire reccondmutex", &lumiera_reccond_section_, \ + RESOURCE_ENTER (nobugflag, (cnd)->rh, "acquire reccondmutex", \ NOBUG_RESOURCE_WAITING, lumiera_reccond_section_.rh); \ if (pthread_mutex_lock (&(cnd)->reccndmutex)) \ LUMIERA_DIE (LOCK_ACQUIRE); \ diff --git a/src/lib/recmutex.h b/src/lib/recmutex.h index a893d3bed..ec0cea6e4 100644 --- a/src/lib/recmutex.h +++ b/src/lib/recmutex.h @@ -45,7 +45,7 @@ ({ \ lumiera_lock_section_.lock = (mtx); \ NOBUG_IF_ALPHA(lumiera_lock_section_.flag = &NOBUG_FLAG(nobugflag);) \ - RESOURCE_ENTER (nobugflag, (mtx)->rh, "acquire recmutex", &lumiera_lock_section_, \ + RESOURCE_ENTER (nobugflag, (mtx)->rh, "acquire recmutex", \ NOBUG_RESOURCE_WAITING, lumiera_lock_section_.rh); \ if (pthread_mutex_lock (&(mtx)->recmutex)) \ LUMIERA_DIE (LOCK_ACQUIRE); \ @@ -67,7 +67,7 @@ REQUIRE (lumiera_lock_section_old_->lock, "section prematurely unlocked"); \ lumiera_lock_section_.lock = (mtx); \ NOBUG_IF_ALPHA(lumiera_lock_section_.flag = &NOBUG_FLAG(nobugflag);) \ - RESOURCE_ENTER (nobugflag, (mtx)->rh, "acquire recmutex", &lumiera_lock_section_, \ + RESOURCE_ENTER (nobugflag, (mtx)->rh, "acquire recmutex", \ NOBUG_RESOURCE_WAITING, lumiera_lock_section_.rh); \ if (pthread_mutex_lock (&(mtx)->recmutex)) \ LUMIERA_DIE (LOCK_ACQUIRE); \ diff --git a/src/lib/rwlock.h b/src/lib/rwlock.h index aa0814b37..1e72347cd 100644 --- a/src/lib/rwlock.h +++ b/src/lib/rwlock.h @@ -55,7 +55,7 @@ LUMIERA_ERROR_DECLARE(RWLOCK_WRLOCK); lumiera_lock_section_.lock = (rwlck); \ NOBUG_IF_ALPHA(lumiera_lock_section_.flag = &NOBUG_FLAG(nobugflag);) \ RESOURCE_ENTER (nobugflag, (rwlck)->rh, "acquire readlock", \ - &lumiera_lock_section_, NOBUG_RESOURCE_WAITING, \ + NOBUG_RESOURCE_WAITING, \ lumiera_lock_section_.rh); \ if (pthread_rwlock_rdlock (&(rwlck)->rwlock)) \ LUMIERA_DIE (LOCK_ACQUIRE); \ @@ -78,7 +78,7 @@ LUMIERA_ERROR_DECLARE(RWLOCK_WRLOCK); REQUIRE (lumiera_lock_section_old_->lock, "section prematurely unlocked"); \ lumiera_lock_section_.lock = (rwlck); \ NOBUG_IF_ALPHA(lumiera_lock_section_.flag = &NOBUG_FLAG(nobugflag);) \ - RESOURCE_ENTER (nobugflag, (rwlck)->rh, "acquire readlock", &lumiera_lock_section_, \ + RESOURCE_ENTER (nobugflag, (rwlck)->rh, "acquire readlock", \ NOBUG_RESOURCE_WAITING, lumiera_lock_section_.rh); \ if (pthread_rwlock_rdlock (&(rwlck)->rwlock)) \ LUMIERA_DIE (LOCK_ACQUIRE); \ @@ -106,7 +106,7 @@ LUMIERA_ERROR_DECLARE(RWLOCK_WRLOCK); lumiera_lock_section_.lock = (rwlck); \ NOBUG_IF_ALPHA(lumiera_lock_section_.flag = &NOBUG_FLAG(nobugflag);) \ RESOURCE_ENTER (nobugflag, (rwlck)->rh, "acquire writelock", \ - &lumiera_lock_section_, NOBUG_RESOURCE_WAITING, \ + NOBUG_RESOURCE_WAITING, \ lumiera_lock_section_.rh); \ if (pthread_rwlock_wrlock (&(rwlck)->rwlock)) \ LUMIERA_DIE (LOCK_ACQUIRE); \ @@ -128,7 +128,7 @@ LUMIERA_ERROR_DECLARE(RWLOCK_WRLOCK); REQUIRE (lumiera_lock_section_old_->lock, "section prematurely unlocked"); \ lumiera_lock_section_.lock = (rwlck); \ NOBUG_IF_ALPHA(lumiera_lock_section_.flag = &NOBUG_FLAG(nobugflag);) \ - RESOURCE_ENTER (nobugflag, (rwlck)->rh, "acquire writelock", &lumiera_lock_section_, \ + RESOURCE_ENTER (nobugflag, (rwlck)->rh, "acquire writelock", \ NOBUG_RESOURCE_WAITING, lumiera_lock_section_.rh); \ if (pthread_rwlock_wrlock (&(twlck)->rwlock)) \ LUMIERA_DIE (LOCK_ACQUIRE); \ diff --git a/src/lib/scoped-holder.hpp b/src/lib/scoped-holder.hpp index 0a1a1d3a8..392a36d58 100644 --- a/src/lib/scoped-holder.hpp +++ b/src/lib/scoped-holder.hpp @@ -117,7 +117,7 @@ namespace lib { transfer_control (ScopedPtrHolder& from, ScopedPtrHolder& to) { if (!from) return; - TRACE (test, "transfer_control... from=%x to=%x",&from, &to); + TRACE (test, "transfer_control... from=%p to=%p",&from, &to); must_be_null (to); to.swap(from); } @@ -229,7 +229,7 @@ namespace lib { transfer_control (ScopedHolder& from, ScopedHolder& to) { if (!from) return; - TRACE (test, "transfer_control... from=%x to=%x",&from, &to); + TRACE (test, "transfer_control... from=%p to=%p",&from, &to); must_be_empty (to); to.create(); try diff --git a/src/lib/test/test-helper.hpp b/src/lib/test/test-helper.hpp index 268e15cbf..ef004ec88 100644 --- a/src/lib/test/test-helper.hpp +++ b/src/lib/test/test-helper.hpp @@ -128,7 +128,7 @@ namespace test{ try \ { \ ERRONEOUS_STATEMENT ; \ - NOTREACHED; \ + NOTREACHED(); \ } \ catch (...) \ { \ diff --git a/tests/components/proc/asset/createassettest.cpp b/tests/components/proc/asset/createassettest.cpp index 70b0fa808..719b7756f 100644 --- a/tests/components/proc/asset/createassettest.cpp +++ b/tests/components/proc/asset/createassettest.cpp @@ -113,13 +113,13 @@ namespace asset try { // can't be found if specifying wrong Asset kind.... aMang.getAsset (ID(mm1->getID())); - NOTREACHED; + NOTREACHED(); } catch (lumiera::error::Invalid& xxx) {ASSERT (xxx.getID()==LUMIERA_ERROR_WRONG_ASSET_KIND);} try { // try accessing nonexistant ID aMang.getAsset (ID (1234567890)); - NOTREACHED; + NOTREACHED(); } catch (lumiera::error::Invalid& xxx) {ASSERT (xxx.getID()==LUMIERA_ERROR_UNKNOWN_ASSET_ID);} lumiera_error (); // reset errorflag diff --git a/tests/components/proc/mobject/placement-ref-test.cpp b/tests/components/proc/mobject/placement-ref-test.cpp index 37347f161..9bbe17109 100644 --- a/tests/components/proc/mobject/placement-ref-test.cpp +++ b/tests/components/proc/mobject/placement-ref-test.cpp @@ -154,7 +154,7 @@ namespace test { try { *ref1; - NOTREACHED; + NOTREACHED(); } catch (...) { @@ -170,7 +170,7 @@ namespace test { try { *ref2; - NOTREACHED; + NOTREACHED(); } catch (...) { diff --git a/tests/lib/meta/config-flags-test.cpp b/tests/lib/meta/config-flags-test.cpp index fd1e085ed..77fb19ea6 100644 --- a/tests/lib/meta/config-flags-test.cpp +++ b/tests/lib/meta/config-flags-test.cpp @@ -314,7 +314,7 @@ namespace test { try { INVOKE_CONFIG_SELECTOR (23); - NOTREACHED ; + NOTREACHED (); } catch (lumiera::error::Invalid& err) { diff --git a/tests/lib/scoped-holder-test.cpp b/tests/lib/scoped-holder-test.cpp index 62011d193..6f31b0766 100644 --- a/tests/lib/scoped-holder-test.cpp +++ b/tests/lib/scoped-holder-test.cpp @@ -124,7 +124,7 @@ namespace test{ try { create_contained_object (holder); - NOTREACHED ; + NOTREACHED (); } catch (int val) { @@ -160,7 +160,7 @@ namespace test{ try { holder2 = holder; - NOTREACHED ; + NOTREACHED (); } catch (lumiera::error::Logic&) { @@ -173,7 +173,7 @@ namespace test{ try { holder = holder2; - NOTREACHED ; + NOTREACHED (); } catch (lumiera::error::Logic&) { @@ -190,7 +190,7 @@ namespace test{ try { holder = holder2; - NOTREACHED ; + NOTREACHED (); } catch (lumiera::error::Logic&) { @@ -203,7 +203,7 @@ namespace test{ try { HO holder3 (holder2); - NOTREACHED ; + NOTREACHED (); } catch (lumiera::error::Logic&) { diff --git a/tests/lib/scopedholdertransfertest.cpp b/tests/lib/scopedholdertransfertest.cpp index 274a4b31f..f92f0319b 100644 --- a/tests/lib/scopedholdertransfertest.cpp +++ b/tests/lib/scopedholdertransfertest.cpp @@ -199,7 +199,7 @@ namespace lib { try { create_contained_object (table[3]); - NOTREACHED ; + NOTREACHED (); } catch (int val) { diff --git a/tests/lib/subsystem-runner-test.cpp b/tests/lib/subsystem-runner-test.cpp index 648b32d0c..82e04364a 100644 --- a/tests/lib/subsystem-runner-test.cpp +++ b/tests/lib/subsystem-runner-test.cpp @@ -288,7 +288,7 @@ namespace lumiera { try { runner.maybeRun (unit2); - NOTREACHED; + NOTREACHED(); } catch (lumiera::Error&) { @@ -297,7 +297,7 @@ namespace lumiera { try { runner.maybeRun (unit3); - NOTREACHED; + NOTREACHED(); } catch (lumiera::Error&) { @@ -398,7 +398,7 @@ namespace lumiera { try { runner.maybeRun (unit4); - NOTREACHED; + NOTREACHED(); } catch (lumiera::Error&) { diff --git a/tests/lib/thread-wrapper-join-test.cpp b/tests/lib/thread-wrapper-join-test.cpp index 57793d2ac..e7e80cd08 100644 --- a/tests/lib/thread-wrapper-join-test.cpp +++ b/tests/lib/thread-wrapper-join-test.cpp @@ -97,7 +97,7 @@ namespace backend { try { waitingHandle.join(); // protocol error: handle wasn't passed for starting a Thread; - NOTREACHED; + NOTREACHED(); } catch (lumiera::error::Logic& logo) { lumiera_error(); } @@ -115,7 +115,7 @@ namespace backend { Thread("test Thread joining-3", bind (&ThreadWrapperJoin_test::theAction, this, 333), waitingHandle); // but then pass it again for another thread.... - NOTREACHED; + NOTREACHED(); } catch (...) { diff --git a/tests/library/test-safeclib.c b/tests/library/test-safeclib.c index a5dfa47a9..8b745928f 100644 --- a/tests/library/test-safeclib.c +++ b/tests/library/test-safeclib.c @@ -27,7 +27,7 @@ TESTS_BEGIN TEST ("allocation0") { lumiera_malloc (0); - NOTREACHED; + NOTREACHED(); } TEST ("allocation1024") @@ -51,7 +51,7 @@ TEST ("allocationtoobig") rl.rlim_max = 100*1024*1024; setrlimit (RLIMIT_AS, &rl); lumiera_malloc (200*1024*1024); - NOTREACHED; + NOTREACHED(); } TEST ("streq")