From e2c22dd1a358747e4f7c2e72f778f771e6341035 Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Fri, 23 Oct 2009 10:21:40 +0000 Subject: [PATCH] 2009-10-23 12:21 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/src/rtl/hbbffnc.c * added note about padding standard - thanks to Mindaugas for information * harbour/contrib/rddsql/sddfb/fbirddd.c * pacified strict alignment warnings * harbour/contrib/hbmemio/memio.c * pacified warning --- harbour/ChangeLog | 10 ++++++++++ harbour/contrib/hbmemio/memio.c | 2 +- harbour/contrib/rddsql/sddfb/fbirddd.c | 6 +++--- harbour/src/rtl/hbbffnc.c | 1 + 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 07b3eb9302..a4f6682dbe 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,16 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-10-23 12:21 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/src/rtl/hbbffnc.c + * added note about padding standard - thanks to Mindaugas for information + + * harbour/contrib/rddsql/sddfb/fbirddd.c + * pacified strict alignment warnings + + * harbour/contrib/hbmemio/memio.c + * pacified warning + 2009-10-23 12:11 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/src/vm/fm.c * enable USE_DL_PREFIX in all C++ builds to avoid conflicts with diff --git a/harbour/contrib/hbmemio/memio.c b/harbour/contrib/hbmemio/memio.c index 5f5147865a..61ffb446fb 100644 --- a/harbour/contrib/hbmemio/memio.c +++ b/harbour/contrib/hbmemio/memio.c @@ -194,7 +194,7 @@ static ULONG memfsInodeFind( const char * szName, ULONG * pulPos ) static PHB_MEMFS_INODE memfsInodeAlloc( const char* szName ) { PHB_MEMFS_INODE pInode = ( PHB_MEMFS_INODE ) hb_xgrab( sizeof( HB_MEMFS_INODE ) ); - ULONG ulInode; + ULONG ulInode = 0; pInode->llSize = 0; pInode->llAlloc = HB_MEMFS_INITSIZE; diff --git a/harbour/contrib/rddsql/sddfb/fbirddd.c b/harbour/contrib/rddsql/sddfb/fbirddd.c index 01fca4a385..389240368a 100644 --- a/harbour/contrib/rddsql/sddfb/fbirddd.c +++ b/harbour/contrib/rddsql/sddfb/fbirddd.c @@ -191,7 +191,7 @@ static HB_ERRCODE fbDisconnect( SQLDDCONNECTION* pConnection ) { ISC_STATUS status[ 5 ]; - isc_detach_database( status, (isc_db_handle*) &pConnection->hConnection ); + isc_detach_database( status, (isc_db_handle*) (void*) &pConnection->hConnection ); return HB_SUCCESS; } @@ -219,7 +219,7 @@ static HB_ERRCODE fbOpen( SQLBASEAREAP pArea ) int iType; - if ( isc_start_transaction ( status, &pTrans, 1, (isc_db_handle*) &pArea->pConnection->hConnection, 0, NULL ) ) + if ( isc_start_transaction ( status, &pTrans, 1, (isc_db_handle*) (void*) &pArea->pConnection->hConnection, 0, NULL ) ) { hb_errRT_FireBirdDD( EG_OPEN, ESQLDD_START, "Start transaction failed", NULL, ( USHORT ) status[ 1 ] ); return HB_FAILURE; @@ -229,7 +229,7 @@ static HB_ERRCODE fbOpen( SQLBASEAREAP pArea ) pSqlda->sqln = 1; pSqlda->version = 1; - if ( isc_dsql_allocate_statement( status, (isc_db_handle*) &pArea->pConnection->hConnection, &pStmt ) ) + if ( isc_dsql_allocate_statement( status, (isc_db_handle*) (void*) &pArea->pConnection->hConnection, &pStmt ) ) { hb_errRT_FireBirdDD( EG_OPEN, ESQLDD_STMTALLOC, "Allocate statement failed", NULL, ( USHORT ) status[ 1 ] ); isc_rollback_transaction( status, &pTrans ); diff --git a/harbour/src/rtl/hbbffnc.c b/harbour/src/rtl/hbbffnc.c index ba02f660ad..0f471d6e51 100644 --- a/harbour/src/rtl/hbbffnc.c +++ b/harbour/src/rtl/hbbffnc.c @@ -83,6 +83,7 @@ HB_FUNC( HB_BLOWFISHENCRYPT ) char * pszData; HB_BLOWFISH * bf = ( HB_BLOWFISH * ) hb_parc( 1 ); + /* ANSI X.923 padding */ ulSize = ( ( ulLen >> 3 ) + 1 ) << 3; pszData = ( char * ) hb_xgrab( ulSize + 1 ); memcpy( pszData, hb_itemGetCPtr( pData ), ulLen );