|
From: <syn...@us...> - 2011-09-29 19:56:45
|
Revision: 1117
http://loki-lib.svn.sourceforge.net/loki-lib/?rev=1117&view=rev
Author: syntheticpp
Date: 2011-09-29 19:56:39 +0000 (Thu, 29 Sep 2011)
Log Message:
-----------
remove some GCC warnings and update Makefile
Modified Paths:
--------------
trunk/include/loki/LevelMutex.h
trunk/include/loki/SmallObj.h
trunk/include/loki/StrongPtr.h
trunk/src/LevelMutex.cpp
trunk/src/SmallObj.cpp
trunk/src/StrongPtr.cpp
trunk/test/SmartPtr/Makefile
Modified: trunk/include/loki/LevelMutex.h
===================================================================
--- trunk/include/loki/LevelMutex.h 2011-09-23 00:46:54 UTC (rev 1116)
+++ trunk/include/loki/LevelMutex.h 2011-09-29 19:56:39 UTC (rev 1117)
@@ -254,7 +254,7 @@
/** 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;
Modified: trunk/include/loki/SmallObj.h
===================================================================
--- trunk/include/loki/SmallObj.h 2011-09-23 00:46:54 UTC (rev 1116)
+++ trunk/include/loki/SmallObj.h 2011-09-29 19:56:39 UTC (rev 1117)
@@ -88,7 +88,7 @@
namespace Private
{
class FixedAllocator;
- }; // end namespace Private
+ } // end namespace Private
/** @class SmallObjAllocator
@ingroup SmallObjectGroupInternal
Modified: trunk/include/loki/StrongPtr.h
===================================================================
--- trunk/include/loki/StrongPtr.h 2011-09-23 00:46:54 UTC (rev 1116)
+++ trunk/include/loki/StrongPtr.h 2011-09-29 19:56:39 UTC (rev 1117)
@@ -1468,9 +1468,9 @@
inline explicit TwoRefLinks( bool strong )
: m_pointer( 0 )
- , m_strong( strong )
, m_prev( this )
, m_next( this )
+ , m_strong( strong )
{
}
Modified: trunk/src/LevelMutex.cpp
===================================================================
--- trunk/src/LevelMutex.cpp 2011-09-23 00:46:54 UTC (rev 1116)
+++ trunk/src/LevelMutex.cpp 2011-09-29 19:56:39 UTC (rev 1117)
@@ -200,7 +200,7 @@
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 @@
{
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 @@
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 @@
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( unsigned int count ) const volatile
+bool LevelMutexInfo::IsRecentLock( std::size_t count ) const volatile
{
LOKI_MUTEX_DEBUG_CODE( Checker checker( this ); (void)checker; )
Modified: trunk/src/SmallObj.cpp
===================================================================
--- trunk/src/SmallObj.cpp 2011-09-23 00:46:54 UTC (rev 1116)
+++ trunk/src/SmallObj.cpp 2011-09-29 19:56:39 UTC (rev 1117)
@@ -1119,7 +1119,7 @@
// ----------------------------------------------------------------------------
-}; // end namespace Private
+} // end namespace Private
using namespace ::Loki::Private;
Modified: trunk/src/StrongPtr.cpp
===================================================================
--- trunk/src/StrongPtr.cpp 2011-09-23 00:46:54 UTC (rev 1116)
+++ trunk/src/StrongPtr.cpp 2011-09-29 19:56:39 UTC (rev 1117)
@@ -344,9 +344,9 @@
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() );
}
Modified: trunk/test/SmartPtr/Makefile
===================================================================
--- trunk/test/SmartPtr/Makefile 2011-09-23 00:46:54 UTC (rev 1116)
+++ trunk/test/SmartPtr/Makefile 2011-09-29 19:56:39 UTC (rev 1117)
@@ -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
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|