diff --git a/harbour/ChangeLog b/harbour/ChangeLog index a385b6dd2d..aaab7971f6 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,18 @@ The license applies to all entries newer than 2009-04-28. */ +2010-06-20 15:24 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * src/vm/thread.c + * Added casts to pacify msvc64 warnings. + Of some the ones related to pMutex->events I'm unsure of, + probably it's better to use 'int' instead of HB_ULONG for + internal variable in some cases to make it look cleaner, + though I assume there was a reason for it, so I left it. + Please check me. + + * src/vm/classes.c + * Added casts to pacify msvc64 warnings. + 2010-06-20 15:10 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * src/vm/extend.c ! Fixed typo in hb_retns(). diff --git a/harbour/src/vm/classes.c b/harbour/src/vm/classes.c index 5d7d777a1f..e4af27d1e6 100644 --- a/harbour/src/vm/classes.c +++ b/harbour/src/vm/classes.c @@ -3903,7 +3903,7 @@ HB_FUNC( __CLS_CNTCLSDATA ) HB_USHORT uiClass = ( HB_USHORT ) hb_parni( 1 ); hb_retni( uiClass && uiClass <= s_uiClasses ? - hb_arrayLen( s_pClasses[ uiClass ]->pClassDatas ) : 0 ); + ( HB_USHORT ) hb_arrayLen( s_pClasses[ uiClass ]->pClassDatas ) : 0 ); } /* @@ -3917,7 +3917,7 @@ HB_FUNC( __CLS_CNTSHRDATA ) HB_USHORT uiClass = ( HB_USHORT ) hb_parni( 1 ); hb_retni( uiClass && uiClass <= s_uiClasses ? - hb_arrayLen( s_pClasses[ uiClass ]->pSharedDatas ) : 0 ); + ( HB_USHORT ) hb_arrayLen( s_pClasses[ uiClass ]->pSharedDatas ) : 0 ); } /* @@ -4236,7 +4236,7 @@ HB_FUNC_STATIC( msgClassSel ) HB_USHORT nParam, nScope; HB_BOOL lFull; - nParam = hb_parnidef( 1, HB_MSGLISTALL ); + nParam = ( HB_USHORT ) hb_parnidef( 1, HB_MSGLISTALL ); nScope = ( HB_USHORT ) hb_parni( 2 ); lFull = hb_parl( 3 ); pReturn = hb_itemArrayNew( pClass->uiMethods ); diff --git a/harbour/src/vm/thread.c b/harbour/src/vm/thread.c index 5c0288c003..b02a4e47c7 100644 --- a/harbour/src/vm/thread.c +++ b/harbour/src/vm/thread.c @@ -957,7 +957,7 @@ static HB_THREAD_STARTFUNC( hb_threadStartVM ) hb_vmThreadInit( ( void * ) pThread ); - ulPCount = hb_arrayLen( pThread->pParams ); + ulPCount = ( HB_ULONG ) hb_arrayLen( pThread->pParams ); if( ulPCount > 0 ) { PHB_ITEM pStart = hb_arrayGetItemPtr( pThread->pParams, 1 ); @@ -1123,7 +1123,7 @@ HB_FUNC( HB_THREADSTART ) pThread->pSet = hb_setClone( hb_stackSetStruct() ); pThread->pParams = hb_arrayBaseParams(); - ulPCount = hb_arrayLen( pThread->pParams ); + ulPCount = ( HB_ULONG ) hb_arrayLen( pThread->pParams ); /* remove thread attributes */ if( ulStart > 1 ) { @@ -1744,7 +1744,7 @@ void hb_threadMutexSyncSignal( PHB_ITEM pItemMtx ) } else { - HB_ULONG ulLen = hb_arrayLen( pMutex->events ); + HB_ULONG ulLen = ( HB_ULONG ) hb_arrayLen( pMutex->events ); iCount -= ulLen; if( iCount > 0 ) hb_arraySize( pMutex->events, ulLen + iCount ); @@ -2088,7 +2088,7 @@ void hb_threadMutexNotify( PHB_ITEM pItem, PHB_ITEM pNotifier, HB_BOOL fWaiting if( pMutex->events ) { - ulLen = hb_arrayLen( pMutex->events ); + ulLen = ( HB_ULONG ) hb_arrayLen( pMutex->events ); iCount -= ulLen; if( iCount > 0 ) hb_arraySize( pMutex->events, ulLen + iCount ); @@ -2135,7 +2135,7 @@ void hb_threadMutexNotify( PHB_ITEM pItem, PHB_ITEM pNotifier, HB_BOOL fWaiting if( pMutex->events ) { - ulLen = hb_arrayLen( pMutex->events ); + ulLen = ( HB_ULONG ) hb_arrayLen( pMutex->events ); iCount -= ulLen; if( iCount > 0 ) hb_arraySize( pMutex->events, ulLen + iCount ); @@ -2509,7 +2509,7 @@ HB_FUNC( HB_MUTEXQUEUEINFO ) if( pMutex ) { hb_storni( pMutex->waiters, 2 ); - hb_stornl( pMutex->events ? hb_arrayLen( pMutex->events ) : 0, 3 ); + hb_stornl( pMutex->events ? ( long ) hb_arrayLen( pMutex->events ) : 0, 3 ); hb_retl( HB_TRUE ); return; }