diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c3b66efb49..5faa6402a9 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,20 @@ +20000316-02:04 GMT+1 Victor Szakats + * source/pp/ppcore.c + ! C++ comment changed to ANSI C + * source/runner/runlib.c + ! Fixed MSVC /W3 warnings. + ! Fixed one BCC55 -w warning (the only -w warning which really made sense.) + * include/hbclass.ch + include/assert.ch + * Some // comments changed to /**/. Cosmetics only. + * contrib/rdd_ads/makefile.vc + contrib/rdd_ads/ads1.c + contrib/rdd_ads/adsfunc.c + + MSVC warning level raised to /W3 + ! MSVC /W3 warnings fixed. + * include/hbver.h + * Date updated. + 20000315-18:00 EST Paul Tucker * source/tools/hb_f.c * source/rtl/gt/gtwin.c diff --git a/harbour/contrib/rdd_ads/ads1.c b/harbour/contrib/rdd_ads/ads1.c index fb252d7446..9f7118d20e 100644 --- a/harbour/contrib/rdd_ads/ads1.c +++ b/harbour/contrib/rdd_ads/ads1.c @@ -515,10 +515,9 @@ static ERRCODE adsPutValue( ADSAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) { LPFIELD pField; USHORT uiCount; - BYTE * pBuffer, * szText, szEndChar; + BYTE * szText, szEndChar; BOOL bError; long lDay, lMonth, lYear; - UNSIGNED32 res; UNSIGNED8 szName[HARBOUR_MAX_RDD_FIELDNAME_LENGTH+1]; UNSIGNED16 pusBufLen = HARBOUR_MAX_RDD_FIELDNAME_LENGTH; UNSIGNED8 pucFormat[11]; @@ -538,7 +537,7 @@ static ERRCODE adsPutValue( ADSAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) case 'C': if( IS_STRING( pItem ) ) { - uiCount = hb_itemGetCLen( pItem ); + uiCount = ( USHORT ) hb_itemGetCLen( pItem ); if( uiCount > pField->uiLen ) uiCount = pField->uiLen; memcpy( szText, hb_itemGetCPtr( pItem ), uiCount ); @@ -595,7 +594,7 @@ static ERRCODE adsPutValue( ADSAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) case 'M': if( IS_STRING( pItem ) ) { - uiCount = hb_itemGetCLen( pItem ); + uiCount = ( USHORT ) hb_itemGetCLen( pItem ); AdsSetString( pArea->hTable, szName, (UCHAR*)hb_itemGetCPtr( pItem ), uiCount ); bError = FALSE; @@ -936,7 +935,7 @@ static ERRCODE adsOrderCreate( ADSAREAP pArea, LPDBORDERCREATEINFO pOrderInfo ) ulOptions, &phIndex); if ( ulRetVal != AE_SUCCESS ) { - commonError( pArea, EG_CREATE, ulRetVal, (char*) pOrderInfo->abBagName ); + commonError( pArea, EG_CREATE, ( USHORT ) ulRetVal, (char*) pOrderInfo->abBagName ); return FAILURE; } return adsGoTop( pArea ); @@ -1154,7 +1153,7 @@ static ERRCODE adsReadDBHeader( ADSAREAP pArea ) adsFieldCount( pArea, &uiFields ); AdsGetRecordLength( pArea->hTable, &pulLength ); - pArea->lpExtendInfo->uiRecordLen = pulLength; + pArea->lpExtendInfo->uiRecordLen = ( USHORT ) pulLength; SUPER_SETFIELDEXTENT( (AREAP)pArea, uiFields ); pFieldInfo.typeExtended = 0; diff --git a/harbour/contrib/rdd_ads/adsfunc.c b/harbour/contrib/rdd_ads/adsfunc.c index 70e7830668..fb66b2f55e 100644 --- a/harbour/contrib/rdd_ads/adsfunc.c +++ b/harbour/contrib/rdd_ads/adsfunc.c @@ -78,24 +78,22 @@ HARBOUR HB_ADSSETSERVERTYPE( void ) HARBOUR HB_ADSLOCKING( void ) { - int lockType, oldType = adsLockType; + int oldType = adsLockType; + if( hb_pcount() > 0 ) - { adsLockType = hb_parl( 1 ); - } + hb_retl( oldType ); - return; } HARBOUR HB_ADSRIGHTSCHECK( void ) { - int lockType, oldType = (adsRights==1)? 1:0; + int oldType = (adsRights==1)? 1:0; + if( hb_pcount() > 0 ) - { adsRights = ( hb_parl( 1 ) )? 1:2; - } + hb_retl( oldType ); - return; } HARBOUR HB_ADSSETCHARTYPE( void ) diff --git a/harbour/contrib/rdd_ads/makefile.vc b/harbour/contrib/rdd_ads/makefile.vc index a05f7d718e..fe985e0eb4 100644 --- a/harbour/contrib/rdd_ads/makefile.vc +++ b/harbour/contrib/rdd_ads/makefile.vc @@ -16,7 +16,7 @@ BIN_DIR = ..\..\bin\vc # CC = cl -CFLAGS = -TP -W1 -nologo -I$(INCLUDE_DIR) +CFLAGS = -TP -W3 -nologo -I$(INCLUDE_DIR) CLIBFLAGS = $(CFLAGS) -c CLIBFLAGSDEBUG = $(CLIBFLAGS) -Zi diff --git a/harbour/include/assert.ch b/harbour/include/assert.ch index 75b34bb7c4..473be47c8c 100644 --- a/harbour/include/assert.ch +++ b/harbour/include/assert.ch @@ -35,7 +35,7 @@ #ifndef HB_ASSERT_CH_ #define HB_ASSERT_CH_ -#define _ASSERT_DEFINED // NOTE: For complete CA-Clipper compatibility +#define _ASSERT_DEFINED /* NOTE: For complete CA-Clipper compatibility */ #ifdef NDEBUG diff --git a/harbour/include/hbapi.h b/harbour/include/hbapi.h index 3ba476337b..83849af6d7 100644 --- a/harbour/include/hbapi.h +++ b/harbour/include/hbapi.h @@ -119,7 +119,7 @@ struct hb_struBlock struct hb_struDate { - LONG value; + long value; }; /* this definition signals that number of decimal places for double value diff --git a/harbour/include/hbclass.ch b/harbour/include/hbclass.ch index 8ab54e55f2..313d930b13 100644 --- a/harbour/include/hbclass.ch +++ b/harbour/include/hbclass.ch @@ -57,23 +57,26 @@ [ ; #translate Super : => ::: ] ; [ ; extern ] + +/* Note the use of commas ',' on the following rule to avoid their call + if there are no AS ... or INIT clauses specified. As we just use + those methods first parameter, the second one supplied acts as a dummy one */ + #xcommand DATA [,] [ AS ] [ INIT ] => ; [ oClass:SetType( <(type)> ) ; ][ oClass:SetInit( ) ; ] ; oClass:AddData( <(DataName1)> ) ; [; oClass:AddData( <(DataNameN)> ) ] ; [; oClass:SetInit(,) ] [ ; oClass:SetType(,<(type)>) ] - // Note the use of commas ',' on the above two rules to avoid their call - // if there are no AS ... or INIT clauses specified. As we just use - // those methods first parameter, the second one supplied acts as a dummy one + +/* Note the use of commas ',' on the following rule to avoid their call + if there are no AS ... or INIT clauses specified. As we just use + those methods first parameter, the second one supplied acts as a dummy one */ #xcommand CLASSDATA [,] [ AS ] [ INIT ] => ; [ oClass:SetType( <(type)> ) ; ][ oClass:SetInit( ) ; ] ; oClass:AddClassData( <(DataName1)> ) ; [; oClass:AddClassData( <(DataNameN)> ) ] ; [; oClass:SetInit(,) ] [ ; oClass:SetType(,<(type)>) ] - // Note the use of commas ',' on the above two rules to avoid their call - // if there are no AS ... or INIT clauses specified. As we just use - // those methods first parameter, the second one supplied acts as a dummy one #xcommand METHOD ( [] ) [ CONSTRUCTOR ] => ; oClass:AddMethod( <(MethodName)>, CLSMETH _CLASS_NAME_ () ) diff --git a/harbour/include/hbver.h b/harbour/include/hbver.h index 8ca6034704..8836b01017 100644 --- a/harbour/include/hbver.h +++ b/harbour/include/hbver.h @@ -81,6 +81,6 @@ #define HB_VER_BUILD 32 /* Build number */ #define HB_VER_YEAR 2000 /* Build year */ #define HB_VER_MONTH 03 /* Build month */ -#define HB_VER_DAY 07 /* Build day */ +#define HB_VER_DAY 14 /* Build day */ #endif /* HB_VER_H_ */ diff --git a/harbour/source/pp/ppcore.c b/harbour/source/pp/ppcore.c index d262b9330b..8a0cdb7d29 100644 --- a/harbour/source/pp/ppcore.c +++ b/harbour/source/pp/ppcore.c @@ -1178,7 +1178,9 @@ static int RemoveSlash( char * stroka ) { hb_pp_Stuff( "", ptr, 0, 1, lenres - (ptr - stroka) ); lenres--; -// ptr++; +/* + ptr++; +*/ } } break; diff --git a/harbour/source/runner/runlib.c b/harbour/source/runner/runlib.c index 89c1ceb243..541bc645e3 100644 --- a/harbour/source/runner/runlib.c +++ b/harbour/source/runner/runlib.c @@ -235,7 +235,7 @@ HARBOUR HB___HRBRUN( void ) { PHB_ITEM pRetVal; - hb_vmProcessSymbols( pSymRead, ulSymbols ); + hb_vmProcessSymbols( pSymRead, ( USHORT ) ulSymbols ); /* Initialize static variables first */ @@ -462,7 +462,7 @@ static PASM_CALL hb_hrbAsmCreateFun( PHB_SYMB pSymbols, BYTE * pCode ) hb_hrbAsmPatch( asmRet->pAsmData, 1, pSymbols ); /* Insert pointer to testsym */ hb_hrbAsmPatch( asmRet->pAsmData, 6, pCode ); /* Insert pointer to testcode */ - hb_hrbAsmPatchRelative( asmRet->pAsmData, 11, &hb_vmExecute, 15 ); + hb_hrbAsmPatchRelative( asmRet->pAsmData, 11, hb_vmExecute, 15 ); /* Insert pointer to hb_vmExecute() */ /* #elseif INTEL16 */ @@ -479,10 +479,10 @@ static void hb_hrbAsmPatch( BYTE * pCode, ULONG ulOffset, void * Address ) /* #if 32 bits and low byte first */ - pCode[ ulOffset ] = ( ( ULONG ) Address ) & 0xFF; - pCode[ ulOffset + 1 ] = ( ( ULONG ) Address >> 8 ) & 0xFF; - pCode[ ulOffset + 2 ] = ( ( ULONG ) Address >> 16 ) & 0xFF; - pCode[ ulOffset + 3 ] = ( ( ULONG ) Address >> 24 ) & 0xFF; + pCode[ ulOffset ] = ( BYTE ) ( ( ( ULONG ) Address ) & 0xFF ); + pCode[ ulOffset + 1 ] = ( BYTE ) ( ( ( ULONG ) Address >> 8 ) & 0xFF ); + pCode[ ulOffset + 2 ] = ( BYTE ) ( ( ( ULONG ) Address >> 16 ) & 0xFF ); + pCode[ ulOffset + 3 ] = ( BYTE ) ( ( ( ULONG ) Address >> 24 ) & 0xFF ); /* #elseif 16 bits and low byte first */ /* #elseif 32 bits and high byte first */ @@ -505,10 +505,10 @@ static void hb_hrbAsmPatchRelative( BYTE * pCode, ULONG ulOffset, /* Relative to next instruction */ ulRelative = ( ULONG ) Address - ulBase; - pCode[ ulOffset ] = ( ulRelative ) & 0xFF; - pCode[ ulOffset + 1 ] = ( ulRelative >> 8 ) & 0xFF; - pCode[ ulOffset + 2 ] = ( ulRelative >> 16 ) & 0xFF; - pCode[ ulOffset + 3 ] = ( ulRelative >> 24 ) & 0xFF; + pCode[ ulOffset ] = ( BYTE ) ( ( ulRelative ) & 0xFF ); + pCode[ ulOffset + 1 ] = ( BYTE ) ( ( ulRelative >> 8 ) & 0xFF ); + pCode[ ulOffset + 2 ] = ( BYTE ) ( ( ulRelative >> 16 ) & 0xFF ); + pCode[ ulOffset + 3 ] = ( BYTE ) ( ( ulRelative >> 24 ) & 0xFF ); /* #elseif 16 bits and low byte first */ /* #elseif 32 bits and high byte first */