diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 7bb6c5c698..83c0141f4c 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,15 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-02-15 15:12 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/contrib/hbfbird/firebird.c + ! use native type for GC pointer item holder instead of casting + to 'void *'. Such casting may strip significant data when handler + is wider type then pointer. + + * harbour/contrib/hbnf/fttext.c + ! fixed unnecessary casting + 2010-02-15 12:33 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/src/vm/hvm.c * minor cleanup diff --git a/harbour/contrib/hbfbird/firebird.c b/harbour/contrib/hbfbird/firebird.c index 8f305bc60c..2913cf1d32 100644 --- a/harbour/contrib/hbfbird/firebird.c +++ b/harbour/contrib/hbfbird/firebird.c @@ -75,7 +75,7 @@ static HB_GARBAGE_FUNC( FB_db_handle_release ) { - void ** ph = ( void ** ) Cargo; + isc_db_handle * ph = ( isc_db_handle * ) Cargo; /* Check if pointer is not NULL to avoid multiple freeing */ if( ph && * ph ) @@ -83,10 +83,10 @@ static HB_GARBAGE_FUNC( FB_db_handle_release ) ISC_STATUS_ARRAY status; /* Destroy the object */ - isc_detach_database( status, ( isc_db_handle * ) ph ); + isc_detach_database( status, ph ); /* set pointer to NULL to avoid multiple freeing */ - * ph = NULL; + * ph = 0; } } @@ -100,9 +100,10 @@ static void hb_FB_db_handle_ret( isc_db_handle p ) { if( p ) { - void ** ph = ( void ** ) hb_gcAllocate( sizeof( isc_db_handle ), &s_gcFB_db_handleFuncs ); + isc_db_handle * ph = ( isc_db_handle * ) + hb_gcAllocate( sizeof( isc_db_handle ), &s_gcFB_db_handleFuncs ); - * ph = ( void * ) p; + * ph = p; hb_retptrGC( ph ); } @@ -112,9 +113,9 @@ static void hb_FB_db_handle_ret( isc_db_handle p ) static isc_db_handle hb_FB_db_handle_par( int iParam ) { - void ** ph = ( void ** ) hb_parptrGC( &s_gcFB_db_handleFuncs, iParam ); + isc_db_handle * ph = ( isc_db_handle * ) hb_parptrGC( &s_gcFB_db_handleFuncs, iParam ); - return ( isc_db_handle ) ( HB_PTRDIFF ) ( ph ? * ph : 0 ); + return ph ? * ph : 0; } /* API wrappers */ diff --git a/harbour/contrib/hbnf/fttext.c b/harbour/contrib/hbnf/fttext.c index 9e9aa49b0d..7a3070a461 100644 --- a/harbour/contrib/hbnf/fttext.c +++ b/harbour/contrib/hbnf/fttext.c @@ -1839,7 +1839,7 @@ static int _ins_buff( int iLen ) while( WriteLen > 0 ) { /* position to beginning of write area */ - if( hb_fsSeekLarge( handles[area], fpWrite, FS_SET ) != (unsigned long) fpWrite ) + if( hb_fsSeekLarge( handles[area], fpWrite, FS_SET ) != fpWrite ) { error[area] = hb_fsError(); break;