Fix all things which broke compilation with NoBug 200909.1

This commit is contained in:
Christian Thaeter 2009-09-04 08:53:03 +02:00
parent d50d9a30f2
commit f73cc47da6
18 changed files with 41 additions and 40 deletions

View file

@ -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 */

View file

@ -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);

View file

@ -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); \

View file

@ -22,6 +22,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include <inttypes.h>
#include <limits.h>
#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<<rem);
TRACE (mpool_dbg, "set bit %d, index %d, of %p is %p", rem, quot, element, bitmap[quot]);
TRACE (mpool_dbg, "set bit %"PRIuPTR", index %"PRIuPTR", of %p is %"PRIuPTR, rem, quot, element, bitmap[quot]);
}
@ -298,7 +299,7 @@ bitmap_clear_element (MPoolcluster cluster, MPool self, void* element)
uintptr_t* bitmap = (uintptr_t*)&cluster->data;
bitmap[quot] &= ~((uintptr_t)1<<rem);
TRACE (mpool_dbg, "cleared bit %d, index %d, of %p is %p", rem, quot, element, bitmap[quot]);
TRACE (mpool_dbg, "cleared bit %"PRIuPTR", index %"PRIuPTR", of %p is %"PRIuPTR, rem, quot, element, bitmap[quot]);
}
@ -492,7 +493,7 @@ nobug_mpool_dump (const_MPool self,
if (depth > 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);

View file

@ -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); \

View file

@ -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); \

View file

@ -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); \

View file

@ -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); \

View file

@ -117,7 +117,7 @@ namespace lib {
transfer_control (ScopedPtrHolder& from, ScopedPtrHolder& to)
{
if (!from) return;
TRACE (test, "transfer_control<ScopedPtrHolder>... from=%x to=%x",&from, &to);
TRACE (test, "transfer_control<ScopedPtrHolder>... 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<ScopedHolder>... from=%x to=%x",&from, &to);
TRACE (test, "transfer_control<ScopedHolder>... from=%p to=%p",&from, &to);
must_be_empty (to);
to.create();
try

View file

@ -128,7 +128,7 @@ namespace test{
try \
{ \
ERRONEOUS_STATEMENT ; \
NOTREACHED; \
NOTREACHED(); \
} \
catch (...) \
{ \

View file

@ -113,13 +113,13 @@ namespace asset
try
{ // can't be found if specifying wrong Asset kind....
aMang.getAsset (ID<asset::Proc>(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<Asset> (1234567890));
NOTREACHED;
NOTREACHED();
}
catch (lumiera::error::Invalid& xxx) {ASSERT (xxx.getID()==LUMIERA_ERROR_UNKNOWN_ASSET_ID);}
lumiera_error (); // reset errorflag

View file

@ -154,7 +154,7 @@ namespace test {
try
{
*ref1;
NOTREACHED;
NOTREACHED();
}
catch (...)
{
@ -170,7 +170,7 @@ namespace test {
try
{
*ref2;
NOTREACHED;
NOTREACHED();
}
catch (...)
{

View file

@ -314,7 +314,7 @@ namespace test {
try
{
INVOKE_CONFIG_SELECTOR (23);
NOTREACHED ;
NOTREACHED ();
}
catch (lumiera::error::Invalid& err)
{

View file

@ -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&)
{

View file

@ -199,7 +199,7 @@ namespace lib {
try
{
create_contained_object (table[3]);
NOTREACHED ;
NOTREACHED ();
}
catch (int val)
{

View file

@ -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&)
{

View file

@ -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 (...)
{

View file

@ -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")