diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 92a1b9cfbb..23dc3cd8ed 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,19 @@ 2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2008-09-05 20:34 UTC+0200 Viktor Szakats (harbour.01 syenar hu) + * source/debug/dbgentry.c + * source/rtl/do.c + * source/rtl/xhelp.c + * contrib/xhb/freadlin.c + * contrib/hbw32/w32_prn.c + * contrib/rddads/ads1.c + * contrib/hbgd/gdwrp.c + * contrib/hbtip/encmthd.c + * utils/hbdoc/hbdfrdln.c + * utils/hbmake/hbmfrdln.c + ! Fixed some more MSVS 2008 -W4 warnings. + 2008-09-05 18:12 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * contrib/hbapollo/apollo.c * contrib/hbclipsm/gauge.c diff --git a/harbour/contrib/hbgd/gdwrp.c b/harbour/contrib/hbgd/gdwrp.c index 6088cd5050..fa7882cfd0 100644 --- a/harbour/contrib/hbgd/gdwrp.c +++ b/harbour/contrib/hbgd/gdwrp.c @@ -419,7 +419,7 @@ static void GDImageSaveTo( int nType ) { gdImagePtr im; char *szFile; - int sz; + int sz = 0; void *iptr = NULL; HB_FHANDLE fhandle; int level = 0, fg = 0; @@ -490,28 +490,28 @@ static void GDImageSaveTo( int nType ) fg = hb_parni( 3 ); } - switch ( nType ) + switch( nType ) { - case IMAGE_JPEG : - /* Get image Ptr */ - iptr = gdImageJpegPtr (im, &sz, level); - break; - case IMAGE_GIF : - /* Get image Ptr */ - iptr = gdImageGifPtr (im, &sz); - break; - case IMAGE_PNG : - /* Get image Ptr */ - iptr = gdImagePngPtrEx (im, &sz, level); - break; - case IMAGE_WBMP : - /* Get image Ptr */ - iptr = gdImageWBMPPtr (im, &sz, fg); - break; - case IMAGE_GD : - /* Get image Ptr */ - iptr = gdImageGdPtr (im, &sz); - break; + case IMAGE_JPEG : + /* Get image Ptr */ + iptr = gdImageJpegPtr( im, &sz, level ); + break; + case IMAGE_GIF : + /* Get image Ptr */ + iptr = gdImageGifPtr( im, &sz ); + break; + case IMAGE_PNG : + /* Get image Ptr */ + iptr = gdImagePngPtrEx( im, &sz, level ); + break; + case IMAGE_WBMP : + /* Get image Ptr */ + iptr = gdImageWBMPPtr( im, &sz, fg ); + break; + case IMAGE_GD : + /* Get image Ptr */ + iptr = gdImageGdPtr( im, &sz ); + break; } /* If i get a file name */ @@ -519,7 +519,6 @@ static void GDImageSaveTo( int nType ) { szFile = hb_parcx( 2 ); SaveImageToFile( szFile, iptr, sz ); - } /* Write to file handle (1 = std output) */ diff --git a/harbour/contrib/hbtip/encmthd.c b/harbour/contrib/hbtip/encmthd.c index b8d9821237..37ef10310c 100644 --- a/harbour/contrib/hbtip/encmthd.c +++ b/harbour/contrib/hbtip/encmthd.c @@ -59,30 +59,30 @@ HB_FUNC( TIPENCODERBASE64_ENCODE ) { - char *cData = hb_parc(1); + char *cData = hb_parc( 1 ); char *cRet; - int nLen = hb_parclen(1); + int nLen = hb_parclen( 1 ); int nPos = 0, nPosRet = 0; int nPosBlock = 0, nLineCount = 0; ULONG nFinalLen; unsigned char cElem, cElem1; BOOL bExcept; - if ( ! cData ) + if( ! cData ) { hb_errRT_BASE( EG_ARG, 3012, NULL, - HB_ERR_FUNCNAME, 1, hb_paramError(1) ); + HB_ERR_FUNCNAME, 1, hb_paramError( 1 ) ); return; } - if ( ! nLen ) + if( ! nLen ) { hb_retc( NULL ); return; } /* read the status of bHttpExcept */ - if ( hb_pcount() > 1 ) + if( hb_pcount() > 1 ) { /* this makes this function static!!!! */ bExcept = hb_parl( 2 ); @@ -96,9 +96,9 @@ HB_FUNC( TIPENCODERBASE64_ENCODE ) nFinalLen = (ULONG) ((nLen / 3 + 2) * 4); /* add line termination padding, CRLF each 76 output bytes */ nFinalLen += (nFinalLen / 72 +1) * 2; - cRet = (char *) hb_xgrab( nFinalLen ); + cRet = ( char * ) hb_xgrab( nFinalLen ); - while ( nPos < nLen ) + while( nPos < nLen ) { cElem = (unsigned char) cData[ nPos ]; /* NOT using trailing 0 here as some buggy 3dparty func @@ -128,19 +128,19 @@ HB_FUNC( TIPENCODERBASE64_ENCODE ) break; } - if ( cElem < 26 ) + if( cElem < 26 ) { cRet[nPosRet++] = cElem + 'A'; } - else if ( cElem < 52 ) + else if( cElem < 52 ) { cRet[nPosRet++] = ( cElem - 26 ) + 'a'; } - else if ( cElem < 62 ) + else if( cElem < 62 ) { cRet[nPosRet++] = ( cElem - 52 ) + '0'; } - else if ( cElem == 62 ) + else if( cElem == 62 ) { cRet[nPosRet++] = '+'; } @@ -149,13 +149,13 @@ HB_FUNC( TIPENCODERBASE64_ENCODE ) cRet[nPosRet++] = '/'; } - if ( ! bExcept ) + if( ! bExcept ) { nLineCount ++ ; /* RFC says to add a CRLF each 76 chars, but is pretty unclear about the fact of this 76 chars counting CRLF or not. Common practice is to limit line size to 72 chars */ - if ( nLineCount == 72 ) + if( nLineCount == 72 ) { cRet[nPosRet++] = '\r'; cRet[nPosRet++] = '\n'; @@ -176,7 +176,7 @@ HB_FUNC( TIPENCODERBASE64_ENCODE ) /* RFC is not explicit, but CRLF SHOULD be added at bottom during encoding phase */ - if ( ! bExcept ) + if( ! bExcept ) { cRet[nPosRet++] = '\r'; cRet[nPosRet++] = '\n'; @@ -188,20 +188,20 @@ HB_FUNC( TIPENCODERBASE64_ENCODE ) HB_FUNC( TIPENCODERBASE64_DECODE ) { - char *cData = hb_parc(1); + char *cData = hb_parc( 1 ); unsigned char *cRet; - int nLen = hb_parclen(1); + int nLen = hb_parclen( 1 ); int nPos = 0, nPosRet = 0, nPosBlock = 0; unsigned char cElem; - if ( ! cData ) + if( ! cData ) { hb_errRT_BASE( EG_ARG, 3012, NULL, - HB_ERR_FUNCNAME, 1, hb_paramError(1) ); + HB_ERR_FUNCNAME, 1, hb_paramError( 1 ) ); return; } - if ( ! nLen ) + if( ! nLen ) { hb_retc( NULL ); return; @@ -209,34 +209,34 @@ HB_FUNC( TIPENCODERBASE64_DECODE ) /* we know exactly the renturned length. */ - cRet = (unsigned char *) hb_xgrab( (nLen / 4 + 1) * 3 ); + cRet = ( unsigned char * ) hb_xgrab( (nLen / 4 + 1) * 3 ); - while ( nPos < nLen ) + while( nPos < nLen ) { cElem = cData[ nPos ]; - if ( cElem >= 'A' && cElem <= 'Z' ) + if( cElem >= 'A' && cElem <= 'Z' ) { cElem -= 'A'; } - else if ( cElem >= 'a' && cElem <= 'z' ) + else if( cElem >= 'a' && cElem <= 'z' ) { cElem = cElem - 'a' + 26; } - else if ( cElem >= '0' && cElem <= '9' ) + else if( cElem >= '0' && cElem <= '9' ) { cElem = cElem - '0' + 52; } - else if ( cElem == '+' ) + else if( cElem == '+' ) { cElem = 62; } - else if ( cElem == '/' ) + else if( cElem == '/' ) { cElem = 63; } /* end of stream? */ - else if ( cElem == '=' ) + else if( cElem == '=' ) { break; } @@ -279,43 +279,43 @@ HB_FUNC( TIPENCODERBASE64_DECODE ) /* this function also adds a zero */ /* hopefully reduce the size of cRet */ - cRet = (unsigned char *) hb_xrealloc( cRet, nPosRet + 1 ); - hb_retclen_buffer( (char *)cRet, nPosRet ); + cRet = ( unsigned char * ) hb_xrealloc( cRet, nPosRet + 1 ); + hb_retclen_buffer( ( char * ) cRet, nPosRet ); } HB_FUNC( TIPENCODERQP_ENCODE ) { - char *cData = hb_parc(1); - int nLen = hb_parclen(1); + char *cData = hb_parc( 1 ); + int nLen = hb_parclen( 1 ); char *cRet; unsigned char cElem; int nVal, iLineLen = 0; int nPosRet = 0, nPos = 0; - if ( ! cData ) + if( ! cData ) { hb_errRT_BASE( EG_ARG, 3012, NULL, - HB_ERR_FUNCNAME, 1, hb_paramError(1) ); + HB_ERR_FUNCNAME, 1, hb_paramError( 1 ) ); return; } - if ( ! nLen ) + if( ! nLen ) { hb_retc( NULL ); return; } /* Preallocating maximum possible length */ - cRet = (char *) hb_xgrab( nLen * 3 + ( nLen/72 ) *3 + 3 ); + cRet = ( char * ) hb_xgrab( nLen * 3 + ( nLen/72 ) *3 + 3 ); /* last +3 is trailing \r\n\0 */ - while ( nPos < nLen ) + while( nPos < nLen ) { cElem = (unsigned char) cData[ nPos ]; /* We chose not to encode spaces and tab here. cElem is signed and ranges from -126 to +127. negative values are automatically encoded */ - if ( (cElem >=33 && cElem <= 60) || cElem >= 62 || + if( (cElem >=33 && cElem <= 60) || cElem >= 62 || cElem == 9 || cElem == 32 ) { cRet[nPosRet++] = (char) cElem; @@ -333,7 +333,7 @@ HB_FUNC( TIPENCODERQP_ENCODE ) nPos++; - if ( iLineLen >= 72 ) + if( iLineLen >= 72 ) { cRet[nPosRet++] = '='; cRet[nPosRet++] = '\r'; @@ -344,7 +344,7 @@ HB_FUNC( TIPENCODERQP_ENCODE ) /* Securing last line trailing space, if needed */ cElem = (unsigned char) cRet[nPosRet - 1]; - if ( cElem == 9 || cElem == 32 ) + if( cElem == 9 || cElem == 32 ) { cRet[nPosRet++] = '='; cRet[nPosRet++] = '\r'; @@ -353,26 +353,26 @@ HB_FUNC( TIPENCODERQP_ENCODE ) /* Adding canonical new line for RFC2045 blocks */ /* this function also adds a zero */ - cRet = (char *) hb_xrealloc( cRet, nPosRet + 1 ); + cRet = ( char * ) hb_xrealloc( cRet, nPosRet + 1 ); hb_retclen_buffer( cRet, nPosRet ); } HB_FUNC( TIPENCODERQP_DECODE ) { - char *cData = hb_parc(1); - int nLen = hb_parclen(1); + char *cData = hb_parc( 1 ); + int nLen = hb_parclen( 1 ); char *cRet; int nPos = 0, nPosRet = 0, nVal; unsigned char cElem, cCipher; - if ( ! cData ) + if( ! cData ) { hb_errRT_BASE( EG_ARG, 3012, NULL, - HB_ERR_FUNCNAME, 1, hb_paramError(1) ); + HB_ERR_FUNCNAME, 1, hb_paramError( 1 ) ); return; } - if ( ! nLen ) + if( ! nLen ) { hb_retc( NULL ); return; @@ -380,19 +380,19 @@ HB_FUNC( TIPENCODERQP_DECODE ) /* allocate maximum possible lenght. */ - cRet = (char *) hb_xgrab( nLen + 1 ); + cRet = ( char * ) hb_xgrab( nLen + 1 ); - while ( nPos < nLen ) + while( nPos < nLen ) { cElem = (unsigned char) cData[ nPos ]; - if ( cElem == '=' ) + if( cElem == '=' ) { - if ( nPos < nLen - 2 ) + if( nPos < nLen - 2 ) { cCipher = (unsigned char) cData[ ++nPos ]; /* soft line break */ - if ( cCipher == '\r' ) + if( cCipher == '\r' ) { nPos += 2; continue; @@ -413,7 +413,7 @@ HB_FUNC( TIPENCODERQP_DECODE ) /* else the encoding is malformed */ else { - if (nPosRet > 0 ) + if(nPosRet > 0 ) { break; } @@ -429,49 +429,49 @@ HB_FUNC( TIPENCODERQP_DECODE ) /* this function also adds a zero */ /* hopefully reduce the size of cRet */ - cRet = (char *) hb_xrealloc( cRet, nPosRet + 1 ); + cRet = ( char * ) hb_xrealloc( cRet, nPosRet + 1 ); hb_retclen_buffer( cRet, nPosRet ); } HB_FUNC( TIPENCODERURL_ENCODE ) { - char *cData = hb_parc(1); - int nLen = hb_parclen(1); - BOOL bComplete = hb_parl(2); + char *cData = hb_parc( 1 ); + int nLen = hb_parclen( 1 ); + BOOL bComplete = hb_parl( 2 ); char *cRet; int nPos = 0, nPosRet = 0, nVal; char cElem; - if ( hb_pcount() < 2 ) + if( hb_pcount() < 2 ) { bComplete = TRUE; } - if ( ! cData ) + if( ! cData ) { hb_errRT_BASE( EG_ARG, 3012, NULL, - HB_ERR_FUNCNAME, 1, hb_paramError(1) ); + HB_ERR_FUNCNAME, 1, hb_paramError( 1 ) ); return; } - if ( ! nLen ) + if( ! nLen ) { hb_retc( NULL ); return; } /* Giving maximum final length possible */ - cRet = (char *) hb_xgrab( nLen * 3 +1); + cRet = ( char * ) hb_xgrab( nLen * 3 + 1 ); - while ( nPos < nLen ) + while( nPos < nLen ) { cElem = cData[ nPos ]; - if ( cElem == ' ' ) + if( cElem == ' ' ) { cRet[ nPosRet ] = '+'; } - else if ( + else if( (cElem >= 'A' && cElem <= 'Z') || (cElem >= 'a' && cElem <= 'z') || (cElem >= '0' && cElem <= '9') || @@ -480,17 +480,17 @@ HB_FUNC( TIPENCODERURL_ENCODE ) { cRet[ nPosRet ] = cElem; } - else if ( ! bComplete && ( cElem == ':' || cElem == '?' || cElem == '=' ) ) + else if( ! bComplete && ( cElem == ':' || cElem == '?' || cElem == '=' ) ) { cRet[ nPosRet ] = cElem; } else /* encode! */ { - cRet[ nPosRet++] = '%'; - nVal = ((unsigned char) cElem) >> 4; - cRet[ nPosRet++] = nVal < 10 ? '0' + nVal : 'A' + nVal - 10; - nVal = ((unsigned char) cElem) & 0x0f; - cRet[ nPosRet ] = nVal < 10 ? '0' + nVal : 'A' + nVal - 10; + cRet[ nPosRet++ ] = '%'; + nVal = ( ( unsigned char ) cElem ) >> 4; + cRet[ nPosRet++ ] = nVal < 10 ? '0' + ( char ) nVal : 'A' + ( char ) nVal - 10; + nVal = ( ( unsigned char ) cElem ) & 0x0F; + cRet[ nPosRet ] = nVal < 10 ? '0' + ( char ) nVal : 'A' + ( char ) nVal - 10; } nPosRet++; @@ -502,20 +502,20 @@ HB_FUNC( TIPENCODERURL_ENCODE ) HB_FUNC( TIPENCODERURL_DECODE ) { - char *cData = hb_parc(1); - int nLen = hb_parclen(1); + char *cData = hb_parc( 1 ); + int nLen = hb_parclen( 1 ); char *cRet; int nPos = 0, nPosRet = 0; char cElem; - if ( ! cData ) + if( ! cData ) { hb_errRT_BASE( EG_ARG, 3012, NULL, - HB_ERR_FUNCNAME, 1, hb_paramError(1) ); + HB_ERR_FUNCNAME, 1, hb_paramError( 1 ) ); return; } - if ( ! nLen ) + if( ! nLen ) { hb_retc( NULL ); return; @@ -523,19 +523,19 @@ HB_FUNC( TIPENCODERURL_DECODE ) /* maximum possible lenght */ - cRet = (char *) hb_xgrab( nLen ); + cRet = ( char * ) hb_xgrab( nLen ); - while ( nPos < nLen ) + while( nPos < nLen ) { cElem = cData[ nPos ]; - if ( cElem == '+' ) + if( cElem == '+' ) { cRet[ nPosRet ] = ' '; } - else if ( cElem == '%' ) + else if( cElem == '%' ) { - if ( nPos < nLen - 2 ) + if( nPos < nLen - 2 ) { cElem = cData[ ++nPos ]; cRet[ nPosRet ] = cElem < 'A' ? cElem - '0' : cElem - 'A' + 10; @@ -546,7 +546,7 @@ HB_FUNC( TIPENCODERURL_DECODE ) } else { - if (nPosRet > 0 ) + if( nPosRet > 0 ) { break; } @@ -563,6 +563,6 @@ HB_FUNC( TIPENCODERURL_DECODE ) /* this function also adds a zero */ /* hopefully reduce the size of cRet */ - cRet = (char *) hb_xrealloc( cRet, nPosRet + 1 ); + cRet = ( char * ) hb_xrealloc( cRet, nPosRet + 1 ); hb_retclen_buffer( cRet, nPosRet ); } diff --git a/harbour/contrib/hbw32/w32_prn.c b/harbour/contrib/hbw32/w32_prn.c index e35a99a2a3..6e7498ba19 100644 --- a/harbour/contrib/hbw32/w32_prn.c +++ b/harbour/contrib/hbw32/w32_prn.c @@ -471,7 +471,7 @@ HB_FUNC( WIN32_LOADBITMAPFILE ) { char * pstrFileName = hb_parc( 1 ); BOOL bSuccess = FALSE; - DWORD dwFileSize, dwHighSize, dwBytesRead; + DWORD dwFileSize = 0, dwHighSize, dwBytesRead; HANDLE hFile; BITMAPFILEHEADER *pbmfh = NULL; diff --git a/harbour/contrib/rddads/ads1.c b/harbour/contrib/rddads/ads1.c index 0e598fa320..a8956930f6 100644 --- a/harbour/contrib/rddads/ads1.c +++ b/harbour/contrib/rddads/ads1.c @@ -115,13 +115,13 @@ static void adsSetListener_callback( HB_set_enum setting, HB_set_listener_enum w AdsSetDefault( ( UNSIGNED8 * ) hb_setGetCPtr( HB_SET_DEFAULT ) ); break; case HB_SET_DELETED : - AdsShowDeleted( ! hb_setGetL( HB_SET_DELETED ) ); + AdsShowDeleted( ( UNSIGNED16 ) ! hb_setGetL( HB_SET_DELETED ) ); break; case HB_SET_EPOCH : - AdsSetEpoch( hb_setGetNI( HB_SET_EPOCH ) ); + AdsSetEpoch( ( UNSIGNED16 ) hb_setGetNI( HB_SET_EPOCH ) ); break; case HB_SET_EXACT : - AdsSetExact( hb_setGetL( HB_SET_EXACT ) ); + AdsSetExact( ( UNSIGNED16 ) hb_setGetL( HB_SET_EXACT ) ); break; case HB_SET_PATH : AdsSetSearchPath( ( UNSIGNED8 * ) hb_setGetCPtr( HB_SET_PATH ) ); @@ -154,9 +154,9 @@ static void adsSetSend( void ) AdsSetDateFormat( ( UNSIGNED8 * ) hb_setGetCPtr( HB_SET_DATEFORMAT ) ); AdsSetDefault( ( UNSIGNED8 * ) hb_setGetCPtr( HB_SET_DEFAULT ) ); - AdsShowDeleted( ! hb_setGetL( HB_SET_DELETED ) ); - AdsSetEpoch( hb_setGetNI( HB_SET_EPOCH ) ); - AdsSetExact( hb_setGetL( HB_SET_EXACT ) ); + AdsShowDeleted( ( UNSIGNED16 ) ! hb_setGetL( HB_SET_DELETED ) ); + AdsSetEpoch( ( UNSIGNED16 ) hb_setGetNI( HB_SET_EPOCH ) ); + AdsSetExact( ( UNSIGNED16 ) hb_setGetL( HB_SET_EXACT ) ); AdsSetSearchPath( ( UNSIGNED8 * ) hb_setGetCPtr( HB_SET_PATH ) ); AdsSetDecimals( ( UNSIGNED16 ) hb_setGetNI( HB_SET_DECIMALS ) ); } @@ -1012,7 +1012,7 @@ static ERRCODE adsSeek( ADSAREAP pArea, BOOL bSoftSeek, PHB_ITEM pKey, BOOL bFin if( pArea->dbfi.itmCobExpr && !pArea->dbfi.fOptimized && !pArea->fEof ) { /* Remember FOUND flag for updating after SKIPFILTER() */ - u16Found = pArea->fFound; + u16Found = ( UNSIGNED16 ) pArea->fFound; if( u16Found && u16KeyLen > 0 ) { @@ -1079,7 +1079,7 @@ static ERRCODE adsSeek( ADSAREAP pArea, BOOL bSoftSeek, PHB_ITEM pKey, BOOL bFin if( u16SavedKeyLen == 0 ) u16Found = FALSE; else - u16Found = adsIndexKeyCmp( pArea->hOrdCurrent, pucSavedKey, u16SavedKeyLen ); + u16Found = ( UNSIGNED16 ) adsIndexKeyCmp( pArea->hOrdCurrent, pucSavedKey, u16SavedKeyLen ); } } } @@ -2282,7 +2282,7 @@ static ERRCODE adsPutValue( ADSAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) { bTypeError = FALSE; *szText = hb_itemGetL( pItem ) ? 'T' : 'F'; - ulRetVal = AdsSetLogical( pArea->hTable, ADSFIELD( uiIndex ), hb_itemGetL( pItem ) ); + ulRetVal = AdsSetLogical( pArea->hTable, ADSFIELD( uiIndex ), ( UNSIGNED16 ) hb_itemGetL( pItem ) ); } break; @@ -2632,11 +2632,16 @@ static ERRCODE adsCreate( ADSAREAP pArea, LPDBOPENINFO pCreateInfo ) } *ucfieldPtr = '\0'; - uRetVal = AdsCreateTable( hConnection, pCreateInfo->abName, pCreateInfo->atomAlias, - pArea->iFileType, hb_ads_iCharType, - hb_ads_iLockType, hb_ads_iCheckRights, - hb_setGetNI( HB_SET_MBLOCKSIZE ), - ucfieldDefs, &hTable ); + uRetVal = AdsCreateTable( hConnection, + pCreateInfo->abName, + pCreateInfo->atomAlias, + ( UNSIGNED16 ) pArea->iFileType, + ( UNSIGNED16 ) hb_ads_iCharType, + ( UNSIGNED16 ) hb_ads_iLockType, + ( UNSIGNED16 ) hb_ads_iCheckRights, + ( UNSIGNED16 ) hb_setGetNI( HB_SET_MBLOCKSIZE ), + ucfieldDefs, + &hTable ); hb_xfree( ucfieldDefs ); if( uRetVal != AE_SUCCESS ) @@ -2910,7 +2915,7 @@ static ERRCODE adsOpen( ADSAREAP pArea, LPDBOPENINFO pOpenInfo ) if( pArea->iFileType == ADS_CDX ) #endif { - AdsStmtSetTableType( hStatement, pArea->iFileType ); + AdsStmtSetTableType( hStatement, ( UNSIGNED16 ) pArea->iFileType ); } u32RetVal = AdsExecuteSQLDirect( hStatement, ( UNSIGNED8 * ) szSQL, &hTable ); @@ -2936,9 +2941,12 @@ static ERRCODE adsOpen( ADSAREAP pArea, LPDBOPENINFO pOpenInfo ) do { u32RetVal = AdsOpenTable( hConnection, - pOpenInfo->abName, pOpenInfo->atomAlias, - (fDictionary ? ADS_DEFAULT : pArea->iFileType), - hb_ads_iCharType, hb_ads_iLockType, hb_ads_iCheckRights, + pOpenInfo->abName, + pOpenInfo->atomAlias, + ( fDictionary ? ADS_DEFAULT : ( UNSIGNED16 ) pArea->iFileType), + ( UNSIGNED16 ) hb_ads_iCharType, + ( UNSIGNED16 ) hb_ads_iLockType, + ( UNSIGNED16 ) hb_ads_iCheckRights, ( pOpenInfo->fShared ? ADS_SHARED : ADS_EXCLUSIVE ) | ( pOpenInfo->fReadonly ? ADS_READONLY : ADS_DEFAULT ), &hTable ); @@ -3307,7 +3315,7 @@ static ERRCODE adsForceRel( ADSAREAP pArea ) static ERRCODE adsSetRel( ADSAREAP pArea, LPDBRELINFO lpdbRelations ) { - UNSIGNED32 ulRetVal = ~AE_SUCCESS; + UNSIGNED32 ulRetVal = ( UNSIGNED32 ) ~AE_SUCCESS; UNSIGNED8 *szExp; USHORT rddID; @@ -4675,7 +4683,7 @@ static void adsRegisterRDD( USHORT * pusRddId ) uiCount = ( USHORT * ) hb_parptr( 1 ); pTable = ( RDDFUNCS * ) hb_parptr( 2 ); - uiRddId = hb_parni( 4 ); + uiRddId = ( USHORT ) hb_parni( 4 ); if( pTable ) { @@ -4843,7 +4851,7 @@ HB_FUNC( ADSCUSTOMIZEAOF ) ADSAREAP pArea; ULONG ulRecord = 0; UNSIGNED32 u32NumRecs = 0; - UNSIGNED32 u32RetVal = ~AE_SUCCESS; /* initialize to something other than success */ + UNSIGNED32 u32RetVal = ( UNSIGNED32 ) ~AE_SUCCESS; /* initialize to something other than success */ UNSIGNED16 u16Option = ADS_AOF_ADD_RECORD; UNSIGNED32 * pu32Records; @@ -4851,7 +4859,7 @@ HB_FUNC( ADSCUSTOMIZEAOF ) if( pArea ) { if( ISNUM( 2 ) ) /* add, delete or toggle */ - u16Option = hb_parni( 2 ); + u16Option = ( UNSIGNED16 ) hb_parni( 2 ); if( ISNIL( 1 ) ) /* default to current record */ { diff --git a/harbour/contrib/xhb/freadlin.c b/harbour/contrib/xhb/freadlin.c index 5cb431067f..3b053ad14a 100644 --- a/harbour/contrib/xhb/freadlin.c +++ b/harbour/contrib/xhb/freadlin.c @@ -190,7 +190,7 @@ HB_FUNC( HB_FREADLINE ) if( ISARRAY( 3 ) ) { pTerm1 = hb_param( 3, HB_IT_ARRAY ); - iTerms = ( int ) hb_arrayLen( pTerm1 ); + iTerms = ( USHORT ) hb_arrayLen( pTerm1 ); if( iTerms <= 0 ) { diff --git a/harbour/source/debug/dbgentry.c b/harbour/source/debug/dbgentry.c index effb86c39b..09c0f11c5c 100644 --- a/harbour/source/debug/dbgentry.c +++ b/harbour/source/debug/dbgentry.c @@ -1038,8 +1038,8 @@ hb_dbgEvalSubstituteVar( HB_WATCHPOINT *watch, char *szWord, int nStart, int nLe t = (char *) ALLOC( strlen( watch->szExpr ) - nLen + 9 + 1 ); memmove( t, watch->szExpr, nStart ); memmove( t + nStart, "__dbg[", 6 ); - t[ nStart + 6 ] = '0' + ( ( j + 1 ) / 10 ); - t[ nStart + 7 ] = '0' + ( ( j + 1 ) % 10 ); + t[ nStart + 6 ] = '0' + ( char ) ( ( j + 1 ) / 10 ); + t[ nStart + 7 ] = '0' + ( char ) ( ( j + 1 ) % 10 ); t[ nStart + 8 ] = ']'; strcpy( t + nStart + 9, watch->szExpr + nStart + nLen ); FREE( watch->szExpr ); diff --git a/harbour/source/rtl/do.c b/harbour/source/rtl/do.c index 329830a477..7518a0bab0 100644 --- a/harbour/source/rtl/do.c +++ b/harbour/source/rtl/do.c @@ -65,7 +65,7 @@ HB_FUNC( DO ) { - USHORT uiPCount = hb_pcount(); + USHORT uiPCount = ( USHORT ) hb_pcount(); if( uiPCount > 0 ) { diff --git a/harbour/source/rtl/xhelp.c b/harbour/source/rtl/xhelp.c index 6f879cf118..cc772fe2e9 100644 --- a/harbour/source/rtl/xhelp.c +++ b/harbour/source/rtl/xhelp.c @@ -65,7 +65,7 @@ HB_FUNC( __XHELP ) { /* awhite: push the existing params after the dyn symbol */ - USHORT uiPCount = hb_pcount(); + USHORT uiPCount = ( USHORT ) hb_pcount(); USHORT uiParam; hb_vmPushDynSym( s_pDynSym ); diff --git a/harbour/utils/hbdoc/hbdfrdln.c b/harbour/utils/hbdoc/hbdfrdln.c index 5cb431067f..3b053ad14a 100644 --- a/harbour/utils/hbdoc/hbdfrdln.c +++ b/harbour/utils/hbdoc/hbdfrdln.c @@ -190,7 +190,7 @@ HB_FUNC( HB_FREADLINE ) if( ISARRAY( 3 ) ) { pTerm1 = hb_param( 3, HB_IT_ARRAY ); - iTerms = ( int ) hb_arrayLen( pTerm1 ); + iTerms = ( USHORT ) hb_arrayLen( pTerm1 ); if( iTerms <= 0 ) { diff --git a/harbour/utils/hbmake/hbmfrdln.c b/harbour/utils/hbmake/hbmfrdln.c index 5cb431067f..3b053ad14a 100644 --- a/harbour/utils/hbmake/hbmfrdln.c +++ b/harbour/utils/hbmake/hbmfrdln.c @@ -190,7 +190,7 @@ HB_FUNC( HB_FREADLINE ) if( ISARRAY( 3 ) ) { pTerm1 = hb_param( 3, HB_IT_ARRAY ); - iTerms = ( int ) hb_arrayLen( pTerm1 ); + iTerms = ( USHORT ) hb_arrayLen( pTerm1 ); if( iTerms <= 0 ) {