remove some GCC warnings and update Makefile
git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@1117 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
parent
4ac9e4f44d
commit
647e6ff06a
7 changed files with 12 additions and 11 deletions
|
@ -254,7 +254,7 @@ public:
|
|||
/** Returns true if this mutex was locked within the last count mutexes.
|
||||
@param count How many recent mutexes to look through to find this mutex.
|
||||
*/
|
||||
bool IsRecentLock( unsigned int count ) const volatile;
|
||||
bool IsRecentLock( std::size_t count ) const volatile;
|
||||
|
||||
/// Returns true if this was locked by current thread.
|
||||
bool IsLockedByCurrentThread( void ) const volatile;
|
||||
|
|
|
@ -88,7 +88,7 @@ namespace Loki
|
|||
namespace Private
|
||||
{
|
||||
class FixedAllocator;
|
||||
}; // end namespace Private
|
||||
} // end namespace Private
|
||||
|
||||
/** @class SmallObjAllocator
|
||||
@ingroup SmallObjectGroupInternal
|
||||
|
|
|
@ -1468,9 +1468,9 @@ protected:
|
|||
|
||||
inline explicit TwoRefLinks( bool strong )
|
||||
: m_pointer( 0 )
|
||||
, m_strong( strong )
|
||||
, m_prev( this )
|
||||
, m_next( this )
|
||||
, m_strong( strong )
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -200,7 +200,7 @@ unsigned int CountMutexesAtCurrentLevel( void )
|
|||
|
||||
MutexErrors::Type DoMutexesMatchContainer( const LevelMutexInfo::MutexContainer & mutexes )
|
||||
{
|
||||
const unsigned int count = mutexes.size();
|
||||
const std::size_t count = mutexes.size();
|
||||
if ( 0 == count )
|
||||
return MutexErrors::EmptyContainer;
|
||||
unsigned int currentLevel = GetCurrentThreadsLevel();
|
||||
|
@ -334,7 +334,7 @@ MutexErrors::Type LevelMutexInfo::MultiLock( MutexContainer & mutexes )
|
|||
{
|
||||
assert( IsValidList() );
|
||||
|
||||
const unsigned int count = mutexes.size();
|
||||
const std::size_t count = mutexes.size();
|
||||
if ( count == 0 )
|
||||
return MutexErrors::EmptyContainer;
|
||||
|
||||
|
@ -417,7 +417,8 @@ MutexErrors::Type LevelMutexInfo::MultiLock( MutexContainer & mutexes,
|
|||
|
||||
if ( 0 == milliSeconds )
|
||||
return MultiLock( mutexes );
|
||||
const unsigned int count = mutexes.size();
|
||||
|
||||
const std::size_t count = mutexes.size();
|
||||
if ( 0 == count )
|
||||
return MutexErrors::EmptyContainer;
|
||||
|
||||
|
@ -507,7 +508,7 @@ MutexErrors::Type LevelMutexInfo::MultiUnlock( MutexContainer & mutexes )
|
|||
LevelMutexInfo::UnlockedLevel, result );
|
||||
}
|
||||
|
||||
const unsigned int count = mutexes.size();
|
||||
const std::size_t count = mutexes.size();
|
||||
if ( 1 < count )
|
||||
{
|
||||
::std::sort( mutexes.begin(), mutexes.end() );
|
||||
|
@ -628,7 +629,7 @@ bool LevelMutexInfo::IsRecentLock( void ) const volatile
|
|||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
bool LevelMutexInfo::IsRecentLock( unsigned int count ) const volatile
|
||||
bool LevelMutexInfo::IsRecentLock( std::size_t count ) const volatile
|
||||
{
|
||||
LOKI_MUTEX_DEBUG_CODE( Checker checker( this ); (void)checker; )
|
||||
|
||||
|
|
|
@ -1119,7 +1119,7 @@ void DefaultDeallocator( void * p )
|
|||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
}; // end namespace Private
|
||||
} // end namespace Private
|
||||
|
||||
using namespace ::Loki::Private;
|
||||
|
||||
|
|
|
@ -344,9 +344,9 @@ void SingleOwnerRefCount::SetPointer( void * p )
|
|||
|
||||
TwoRefLinks::TwoRefLinks( const void * p, bool strong )
|
||||
: m_pointer( const_cast< void * >( p ) )
|
||||
, m_strong( strong )
|
||||
, m_prev( this )
|
||||
, m_next( this )
|
||||
, m_strong( strong )
|
||||
{
|
||||
assert( IsValid() );
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
include ../Makefile.common
|
||||
|
||||
BIN := main$(BIN_SUFFIX)
|
||||
SRC := main.cpp strong.cpp LockTest.cpp
|
||||
SRC := main.cpp strong.cpp LockTest.cpp colvin_gibbons_trick.cpp
|
||||
OBJ := $(SRC:.cpp=.o)
|
||||
LDLIBS += -lpthread
|
||||
|
||||
|
|
Loading…
Reference in a new issue