From d442c6fee948b555520a38ca6db2f92d601f4dbc Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sun, 20 Jun 2010 09:09:08 +0000 Subject: [PATCH] 2010-06-20 11:06 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * src/vm/cmdarg.c * src/common/hbffind.c * src/common/hbtrace.c * src/common/hbfsapi.c * src/common/hbhash.c * src/rtl/setkey.c * src/compiler/hbmain.c * src/compiler/hbcmplib.c * src/compiler/harbour.yyc * src/compiler/harbour.y * include/hbapi.h * contrib/hbmemio/memio.c * contrib/hbhpdf/harupdf.c * contrib/hbpgsql/postgres.c * examples/pp/hbppcore.c * examples/pp/hbppcomp.c * Deleted unnecessary '( void * )' casts. Pls Check me. --- harbour/ChangeLog | 20 ++++++++++++++ harbour/contrib/hbhpdf/harupdf.c | 2 +- harbour/contrib/hbmemio/memio.c | 2 +- harbour/contrib/hbpgsql/postgres.c | 2 +- harbour/examples/pp/hbppcomp.c | 22 +++++++-------- harbour/examples/pp/hbppcore.c | 28 +++++++++---------- harbour/include/hbapi.h | 2 +- harbour/src/common/hbffind.c | 4 +-- harbour/src/common/hbfsapi.c | 4 +-- harbour/src/common/hbhash.c | 10 +++---- harbour/src/common/hbtrace.c | 8 +++--- harbour/src/compiler/harbour.y | 12 ++++---- harbour/src/compiler/harbour.yyc | 13 ++++----- harbour/src/compiler/hbcmplib.c | 6 ++-- harbour/src/compiler/hbmain.c | 44 +++++++++++++++--------------- harbour/src/rtl/setkey.c | 2 +- harbour/src/vm/cmdarg.c | 6 ++-- 17 files changed, 103 insertions(+), 84 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 97650c0c9b..4fae4a420a 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,26 @@ The license applies to all entries newer than 2009-04-28. */ +2010-06-20 11:06 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * src/vm/cmdarg.c + * src/common/hbffind.c + * src/common/hbtrace.c + * src/common/hbfsapi.c + * src/common/hbhash.c + * src/rtl/setkey.c + * src/compiler/hbmain.c + * src/compiler/hbcmplib.c + * src/compiler/harbour.yyc + * src/compiler/harbour.y + * include/hbapi.h + * contrib/hbmemio/memio.c + * contrib/hbhpdf/harupdf.c + * contrib/hbpgsql/postgres.c + * examples/pp/hbppcore.c + * examples/pp/hbppcomp.c + * Deleted unnecessary '( void * )' casts. + Pls Check me. + 2010-06-20 10:37 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * src/vm/macro.c * src/vm/strapi.c diff --git a/harbour/contrib/hbhpdf/harupdf.c b/harbour/contrib/hbhpdf/harupdf.c index 81ebc23c34..960f339b0d 100644 --- a/harbour/contrib/hbhpdf/harupdf.c +++ b/harbour/contrib/hbhpdf/harupdf.c @@ -155,7 +155,7 @@ HB_FUNC( HPDF_SAVETOFILE ) hb_retnl( ( long ) HPDF_SaveToFile( HPDF_Doc_par( 1 ), pszFileName ) ); if( pszFree ) - hb_xfree( ( void * ) pszFree ); + hb_xfree( pszFree ); } /*----------------------------------------------------------------------*/ /* HPdf_SaveToStream( hDoc ) -> hStatus diff --git a/harbour/contrib/hbmemio/memio.c b/harbour/contrib/hbmemio/memio.c index 49d523b988..33beb89719 100644 --- a/harbour/contrib/hbmemio/memio.c +++ b/harbour/contrib/hbmemio/memio.c @@ -486,7 +486,7 @@ HB_MEMFS_EXPORT void hb_memfsClose( HB_FHANDLE hFile ) pInode->uiDeny ^= pFile->uiFlags & FOX_DENYFLAGS; } HB_MEMFSMT_UNLOCK - hb_xfree( ( void * ) pFile ); + hb_xfree( pFile ); } diff --git a/harbour/contrib/hbpgsql/postgres.c b/harbour/contrib/hbpgsql/postgres.c index 0ec5d15ea0..2d12fda3e2 100644 --- a/harbour/contrib/hbpgsql/postgres.c +++ b/harbour/contrib/hbpgsql/postgres.c @@ -508,7 +508,7 @@ HB_FUNC( PQEXECPARAMS ) hb_PGresult_ret( PQexecParams( conn, hb_parcx( 2 ), n, NULL, paramvalues, NULL, NULL, 1 ) ); - hb_xfree( ( void * ) paramvalues ); + hb_xfree( paramvalues ); } else hb_errRT_BASE( EG_ARG, 2020, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); diff --git a/harbour/examples/pp/hbppcomp.c b/harbour/examples/pp/hbppcomp.c index 56986465a5..e61b63f73e 100644 --- a/harbour/examples/pp/hbppcomp.c +++ b/harbour/examples/pp/hbppcomp.c @@ -92,28 +92,28 @@ void hb_pp_InternalFree( void ) #if defined(HB_PP_DEBUG_MEMORY) if( s_szLine ) { - hb_xfree( (void *)s_szLine ); + hb_xfree( s_szLine ); s_szLine = NULL; } if( s_szOutLine ) { - hb_xfree( (void *)s_szOutLine ); + hb_xfree( s_szOutLine ); s_szOutLine = NULL; } #endif if( s_TextOutFunc ) { - hb_xfree( (void *)s_TextOutFunc ); + hb_xfree( s_TextOutFunc ); s_TextOutFunc = NULL; } if( s_TextEndFunc ) { - hb_xfree( (void *)s_TextEndFunc ); + hb_xfree( s_TextEndFunc ); s_TextEndFunc = NULL; } if( s_TextStartFunc ) { - hb_xfree( (void *)s_TextStartFunc ); + hb_xfree( s_TextStartFunc ); s_TextStartFunc = NULL; } } @@ -433,7 +433,7 @@ static void pp_TextBlockFinish( void ) if( s_TextEndFunc ) { hb_strncpy( s_szLine, s_TextEndFunc, sizeof( s_szLine ) - 1 ); - hb_xfree( (void *)s_TextEndFunc ); + hb_xfree( s_TextEndFunc ); s_TextEndFunc = NULL; } else @@ -442,12 +442,12 @@ static void pp_TextBlockFinish( void ) } if( s_TextOutFunc ) { - hb_xfree( (void *)s_TextOutFunc ); + hb_xfree( s_TextOutFunc ); s_TextOutFunc = NULL; } if( s_TextStartFunc ) { - hb_xfree( (void *)s_TextStartFunc ); + hb_xfree( s_TextStartFunc ); s_TextStartFunc = NULL; } hb_pp_NestedLiteralString = HB_FALSE; @@ -525,7 +525,7 @@ static void pp_StreamBlockFinish( void ) if( s_TextStartFunc ) { hb_strncat( s_szLine, s_TextStartFunc, sizeof( s_szLine ) - 1 ); - hb_xfree( (void *)s_TextStartFunc ); + hb_xfree( s_TextStartFunc ); s_TextStartFunc = NULL; } hb_strncat( s_szLine, "[", sizeof( s_szLine ) - 1 ); @@ -534,12 +534,12 @@ static void pp_StreamBlockFinish( void ) if( s_TextEndFunc ) { hb_strncat( s_szLine, s_TextEndFunc, sizeof( s_szLine ) - 1 ); - hb_xfree( (void *)s_TextEndFunc ); + hb_xfree( s_TextEndFunc ); s_TextEndFunc = NULL; } if( s_TextOutFunc ) { - hb_xfree( (void *)s_TextOutFunc ); + hb_xfree( s_TextOutFunc ); s_TextOutFunc = NULL; } hb_pp_NestedLiteralString = HB_TRUE; diff --git a/harbour/examples/pp/hbppcore.c b/harbour/examples/pp/hbppcore.c index a00c4da036..5fa8c53d33 100644 --- a/harbour/examples/pp/hbppcore.c +++ b/harbour/examples/pp/hbppcore.c @@ -278,7 +278,7 @@ void hb_pp_SetRules_( HB_INCLUDE_FUNC_PTR pIncludeFunc, HB_BOOL bQuiet ) hb_comp_files.pLast = NULL; hb_comp_files.iFiles = 0; - hb_xfree( ( void * ) hb_comp_pFileName ); + hb_xfree( hb_comp_pFileName ); hb_comp_pFileName = NULL; } else @@ -353,7 +353,7 @@ void hb_pp_Free( void ) } if( hb_pp_aCondCompile ) { - hb_xfree( ( void * ) hb_pp_aCondCompile ); + hb_xfree( hb_pp_aCondCompile ); hb_pp_aCondCompile = NULL; } hb_pp_InternalFree(); @@ -962,7 +962,7 @@ static void ParseCommand( char *sLine, HB_BOOL com_or_xcom, HB_BOOL com_or_tra ) if( !ipos ) { #if defined(HB_PP_DEBUG_MEMORY) - hb_xfree( ( void * ) mpatt ); + hb_xfree( mpatt ); #endif return; } @@ -1046,7 +1046,7 @@ static void ParseCommand( char *sLine, HB_BOOL com_or_xcom, HB_BOOL com_or_tra ) hb_compGenError( NULL, hb_pp_szErrors, 'F', HB_PP_ERR_COMMAND_DEFINITION, cmdname, sLine ); } #if defined(HB_PP_DEBUG_MEMORY) - hb_xfree( ( void * ) mpatt ); + hb_xfree( mpatt ); #endif } @@ -1673,7 +1673,7 @@ int hb_pp_ParseExpression( char *sLine, char *sOutLine, HB_BOOL bSplitLines ) } #if defined(HB_PP_DEBUG_MEMORY) - hb_xfree( ( void * ) rpatt ); + hb_xfree( rpatt ); #endif return 0; } @@ -2242,7 +2242,7 @@ static int WorkMarkers( char **ptrmp, char **ptri, char *ptro, int *lenres, HB_B if( s_numBrackets ) { #if defined(HB_PP_DEBUG_MEMORY) - hb_xfree( ( void * ) exppatt ); + hb_xfree( exppatt ); #endif return 0; } @@ -2280,7 +2280,7 @@ static int WorkMarkers( char **ptrmp, char **ptri, char *ptro, int *lenres, HB_B if( s_numBrackets ) { #if defined(HB_PP_DEBUG_MEMORY) - hb_xfree( ( void * ) exppatt ); + hb_xfree( exppatt ); #endif return 0; } @@ -2296,7 +2296,7 @@ static int WorkMarkers( char **ptrmp, char **ptri, char *ptro, int *lenres, HB_B if( s_numBrackets ) { #if defined(HB_PP_DEBUG_MEMORY) - hb_xfree( ( void * ) exppatt ); + hb_xfree( exppatt ); #endif return 0; } @@ -2419,7 +2419,7 @@ static int WorkMarkers( char **ptrmp, char **ptri, char *ptro, int *lenres, HB_B else { #if defined(HB_PP_DEBUG_MEMORY) - hb_xfree( ( void * ) exppatt ); + hb_xfree( exppatt ); #endif *ptri = ptrmacro; /* restore '&' char */ return 0; @@ -2429,7 +2429,7 @@ static int WorkMarkers( char **ptrmp, char **ptri, char *ptro, int *lenres, HB_B else { #if defined(HB_PP_DEBUG_MEMORY) - hb_xfree( ( void * ) exppatt ); + hb_xfree( exppatt ); #endif *ptri -= 1; /* restore '&' char */ return 0; @@ -2472,7 +2472,7 @@ static int WorkMarkers( char **ptrmp, char **ptri, char *ptro, int *lenres, HB_B { /* If restricted match marker doesn't correspond to real parameter */ #if defined(HB_PP_DEBUG_MEMORY) - hb_xfree( ( void * ) exppatt ); + hb_xfree( exppatt ); #endif return 0; } @@ -2491,7 +2491,7 @@ static int WorkMarkers( char **ptrmp, char **ptri, char *ptro, int *lenres, HB_B else { #if defined(HB_PP_DEBUG_MEMORY) - hb_xfree( ( void * ) exppatt ); + hb_xfree( exppatt ); #endif return 0; } @@ -2515,14 +2515,14 @@ static int WorkMarkers( char **ptrmp, char **ptri, char *ptro, int *lenres, HB_B else { #if defined(HB_PP_DEBUG_MEMORY) - hb_xfree( ( void * ) exppatt ); + hb_xfree( exppatt ); #endif return 0; } } #if defined(HB_PP_DEBUG_MEMORY) - hb_xfree( ( void * ) exppatt ); + hb_xfree( exppatt ); #endif return 1; } diff --git a/harbour/include/hbapi.h b/harbour/include/hbapi.h index 7625de14e8..9a30de411a 100644 --- a/harbour/include/hbapi.h +++ b/harbour/include/hbapi.h @@ -1164,7 +1164,7 @@ extern HB_EXPORT const char * hb_osDecodeCP( const char * szName, char ** pszFre /* environment variables access */ extern HB_BOOL hb_getenv_buffer( const char * szName, char * szBuffer, int nSize ); -/* WARNING: This returned pointer must be freed if not NULL using hb_xfree( ( void * ) ptr ); */ +/* WARNING: This returned pointer must be freed if not NULL using hb_xfree( ptr ); */ extern char * hb_getenv( const char * name ); extern HB_BOOL hb_setenv( const char * szName, const char * szValue ); /* set or delete (szValue==NULL) environment variable */ extern char * hb_netname( void ); diff --git a/harbour/src/common/hbffind.c b/harbour/src/common/hbffind.c index 74df88b3e5..2233a856c5 100644 --- a/harbour/src/common/hbffind.c +++ b/harbour/src/common/hbffind.c @@ -931,9 +931,9 @@ void hb_fsFindClose( PHB_FFIND ffind ) hb_vmLock(); - hb_xfree( ( void * ) ffind->info ); + hb_xfree( ffind->info ); } - hb_xfree( ( void * ) ffind ); + hb_xfree( ffind ); } } diff --git a/harbour/src/common/hbfsapi.c b/harbour/src/common/hbfsapi.c index 60fb3b40c1..3dbe06e2b0 100644 --- a/harbour/src/common/hbfsapi.c +++ b/harbour/src/common/hbfsapi.c @@ -403,7 +403,7 @@ HB_BOOL hb_fsFileExists( const char * pszFileName ) #endif if( pszFree ) - hb_xfree( ( void * ) pszFree ); + hb_xfree( pszFree ); return fExist; } @@ -465,7 +465,7 @@ HB_BOOL hb_fsDirExists( const char * pszDirName ) #endif if( pszFree ) - hb_xfree( ( void * ) pszFree ); + hb_xfree( pszFree ); return fExist; } diff --git a/harbour/src/common/hbhash.c b/harbour/src/common/hbhash.c index 1a8da02129..7560347206 100644 --- a/harbour/src/common/hbhash.c +++ b/harbour/src/common/hbhash.c @@ -68,7 +68,7 @@ static void hb_hashItemDelete( HB_HASH_TABLE_PTR pTable, HB_HASH_ITEM_PTR pItem { if( pTable->pDeleteItemFunc ) ( pTable->pDeleteItemFunc )( pTable, pItem->KeyPtr, pItem->ValPtr ); - hb_xfree( ( void * ) pItem ); + hb_xfree( pItem ); } /* create a new hash table @@ -121,8 +121,8 @@ void hb_hashTableKill( HB_HASH_TABLE_PTR pTable ) } ++ulSize; } - hb_xfree( ( void * ) pTable->pItems ); - hb_xfree( ( void * ) pTable ); + hb_xfree( pTable->pItems ); + hb_xfree( pTable ); } /* resize table */ @@ -172,8 +172,8 @@ HB_HASH_TABLE_PTR hb_hashTableResize( HB_HASH_TABLE_PTR pTable, HB_SIZE ulNewSiz } ++ulSize; } - hb_xfree( ( void * ) pTable->pItems ); - hb_xfree( ( void * ) pTable ); + hb_xfree( pTable->pItems ); + hb_xfree( pTable ); return pNew; } diff --git a/harbour/src/common/hbtrace.c b/harbour/src/common/hbtrace.c index e707f9fd41..bca92c66d8 100644 --- a/harbour/src/common/hbtrace.c +++ b/harbour/src/common/hbtrace.c @@ -136,7 +136,7 @@ int hb_tr_level( void ) s_fp = stderr; if( env ) - hb_xfree( ( void * ) env ); + hb_xfree( env ); /* ; */ @@ -157,7 +157,7 @@ int hb_tr_level( void ) } if( env ) - hb_xfree( ( void * ) env ); + hb_xfree( env ); /* ; */ @@ -168,7 +168,7 @@ int hb_tr_level( void ) s_sysout = 0; if( env ) - hb_xfree( ( void * ) env ); + hb_xfree( env ); /* ; */ @@ -179,7 +179,7 @@ int hb_tr_level( void ) s_flush = 0; if( env ) - hb_xfree( ( void * ) env ); + hb_xfree( env ); } return s_level; diff --git a/harbour/src/compiler/harbour.y b/harbour/src/compiler/harbour.y index 4001917546..13d4ac4cfd 100644 --- a/harbour/src/compiler/harbour.y +++ b/harbour/src/compiler/harbour.y @@ -2146,7 +2146,7 @@ static void hb_compLoopHere( HB_COMP_DECL ) hb_compGenJumpHere( pLoop->ulOffset + 1, HB_COMP_PARAM ); pFree = pLoop; pLoop = pLoop->pLoopList; - hb_xfree( ( void * ) pFree ); + hb_xfree( pFree ); } pLast->pLoopList = NULL; } @@ -2174,13 +2174,13 @@ static void hb_compLoopEnd( HB_COMP_DECL ) hb_compGenJumpHere( pExit->ulOffset + 1, HB_COMP_PARAM ); pFree = pExit; pExit = pExit->pExitList; - hb_xfree( ( void * ) pFree ); + hb_xfree( pFree ); } pLast->pNext = NULL; if( pLoop == pFunc->pLoops ) pFunc->pLoops = NULL; - hb_xfree( ( void * ) pLoop ); + hb_xfree( pLoop ); } } @@ -2195,16 +2195,16 @@ void hb_compLoopKill( PFUNCTION pFunc ) { pFree = pLoop->pExitList; pLoop->pExitList = pFree->pExitList; - hb_xfree( ( void * ) pFree ); + hb_xfree( pFree ); } while( pLoop->pLoopList ) { pFree = pLoop->pLoopList; pLoop->pLoopList = pFree->pLoopList; - hb_xfree( ( void * ) pFree ); + hb_xfree( pFree ); } pFunc->pLoops = pLoop->pNext; - hb_xfree( ( void * ) pLoop ); + hb_xfree( pLoop ); } } diff --git a/harbour/src/compiler/harbour.yyc b/harbour/src/compiler/harbour.yyc index 1016f948cb..c1f0321a8e 100644 --- a/harbour/src/compiler/harbour.yyc +++ b/harbour/src/compiler/harbour.yyc @@ -7317,7 +7317,7 @@ static void hb_compLoopHere( HB_COMP_DECL ) hb_compGenJumpHere( pLoop->ulOffset + 1, HB_COMP_PARAM ); pFree = pLoop; pLoop = pLoop->pLoopList; - hb_xfree( ( void * ) pFree ); + hb_xfree( pFree ); } pLast->pLoopList = NULL; } @@ -7345,13 +7345,13 @@ static void hb_compLoopEnd( HB_COMP_DECL ) hb_compGenJumpHere( pExit->ulOffset + 1, HB_COMP_PARAM ); pFree = pExit; pExit = pExit->pExitList; - hb_xfree( ( void * ) pFree ); + hb_xfree( pFree ); } pLast->pNext = NULL; if( pLoop == pFunc->pLoops ) pFunc->pLoops = NULL; - hb_xfree( ( void * ) pLoop ); + hb_xfree( pLoop ); } } @@ -7366,16 +7366,16 @@ void hb_compLoopKill( PFUNCTION pFunc ) { pFree = pLoop->pExitList; pLoop->pExitList = pFree->pExitList; - hb_xfree( ( void * ) pFree ); + hb_xfree( pFree ); } while( pLoop->pLoopList ) { pFree = pLoop->pLoopList; pLoop->pLoopList = pFree->pLoopList; - hb_xfree( ( void * ) pFree ); + hb_xfree( pFree ); } pFunc->pLoops = pLoop->pNext; - hb_xfree( ( void * ) pLoop ); + hb_xfree( pLoop ); } } @@ -8019,4 +8019,3 @@ void yyerror( HB_COMP_DECL, const char * s ) else hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_YACC, s, HB_COMP_PARAM->pLex->lasttok ); } - diff --git a/harbour/src/compiler/hbcmplib.c b/harbour/src/compiler/hbcmplib.c index 7791370fb2..dc121ff102 100644 --- a/harbour/src/compiler/hbcmplib.c +++ b/harbour/src/compiler/hbcmplib.c @@ -115,7 +115,7 @@ HB_FUNC( HB_COMPILE ) hb_compGenArgList( 1, hb_pcount(), &argc, &argv ); hb_retni( hb_compMain( argc, argv, NULL, NULL, NULL ) ); - hb_xfree( ( void * ) argv ); + hb_xfree( argv ); } HB_FUNC( HB_COMPILEBUF ) @@ -127,7 +127,7 @@ HB_FUNC( HB_COMPILEBUF ) hb_compGenArgList( 1, hb_pcount(), &argc, &argv ); iResult = hb_compMain( argc, argv, &pBuffer, &ulLen, NULL ); - hb_xfree( ( void * ) argv ); + hb_xfree( argv ); if( iResult == EXIT_SUCCESS && pBuffer ) hb_retclen_buffer( ( char * ) pBuffer, ulLen ); } @@ -145,7 +145,7 @@ HB_FUNC( HB_COMPILEFROMBUF ) { hb_compGenArgList( 2, hb_pcount(), &argc, &argv ); iResult = hb_compMain( argc, argv, &pBuffer, &ulLen, szSource ); - hb_xfree( ( void * ) argv ); + hb_xfree( argv ); if( iResult == EXIT_SUCCESS && pBuffer ) hb_retclen_buffer( ( char * ) pBuffer, ulLen ); } diff --git a/harbour/src/compiler/hbmain.c b/harbour/src/compiler/hbmain.c index aebde9b0d3..ca48231af7 100644 --- a/harbour/src/compiler/hbmain.c +++ b/harbour/src/compiler/hbmain.c @@ -1841,42 +1841,42 @@ static PFUNCTION hb_compFunctionKill( HB_COMP_DECL, PFUNCTION pFunc ) { pVar = pFunc->pLocals; pFunc->pLocals = pVar->pNext; - hb_xfree( ( void * ) pVar ); + hb_xfree( pVar ); } while( pFunc->pStatics ) { pVar = pFunc->pStatics; pFunc->pStatics = pVar->pNext; - hb_xfree( ( void * ) pVar ); + hb_xfree( pVar ); } while( pFunc->pFields ) { pVar = pFunc->pFields; pFunc->pFields = pVar->pNext; - hb_xfree( ( void * ) pVar ); + hb_xfree( pVar ); } while( pFunc->pMemvars ) { pVar = pFunc->pMemvars; pFunc->pMemvars = pVar->pNext; - hb_xfree( ( void * ) pVar ); + hb_xfree( pVar ); } while( pFunc->pDetached ) { pVar = pFunc->pDetached; pFunc->pDetached = pVar->pNext; - hb_xfree( ( void * ) pVar ); + hb_xfree( pVar ); } while( pFunc->pPrivates ) { pVar = pFunc->pPrivates; pFunc->pPrivates = pVar->pNext; - hb_xfree( ( void * ) pVar ); + hb_xfree( pVar ); } while( pFunc->pEnum ) @@ -1888,14 +1888,14 @@ static PFUNCTION hb_compFunctionKill( HB_COMP_DECL, PFUNCTION pFunc ) /* Release the NOOP array. */ if( pFunc->pNOOPs ) - hb_xfree( ( void * ) pFunc->pNOOPs ); + hb_xfree( pFunc->pNOOPs ); /* Release the Jumps array. */ if( pFunc->pJumps ) - hb_xfree( ( void * ) pFunc->pJumps ); + hb_xfree( pFunc->pJumps ); - hb_xfree( ( void * ) pFunc->pCode ); - hb_xfree( ( void * ) pFunc ); + hb_xfree( pFunc->pCode ); + hb_xfree( pFunc ); return pNext; } @@ -2227,7 +2227,7 @@ static void hb_compExternGen( HB_COMP_DECL ) } pDelete = HB_COMP_PARAM->externs; HB_COMP_PARAM->externs = HB_COMP_PARAM->externs->pNext; - hb_xfree( ( void * ) pDelete ); + hb_xfree( pDelete ); } } @@ -3661,14 +3661,14 @@ void hb_compCodeBlockRewind( HB_COMP_DECL ) /* Release the NOOP array. */ if( pCodeblock->pNOOPs ) { - hb_xfree( ( void * ) pCodeblock->pNOOPs ); + hb_xfree( pCodeblock->pNOOPs ); pCodeblock->pNOOPs = NULL; pCodeblock->iNOOPs = 0; } /* Release the Jumps array. */ if( pCodeblock->pJumps ) { - hb_xfree( ( void * ) pCodeblock->pJumps ); + hb_xfree( pCodeblock->pJumps ); pCodeblock->pJumps = NULL; pCodeblock->iJumps = 0; } @@ -3874,7 +3874,7 @@ void hb_compCompileEnd( HB_COMP_DECL ) HB_COMP_PARAM->inlines.pFirst = pInline->pNext; if( pInline->pCode ) hb_xfree( pInline->pCode ); - hb_xfree( ( void * ) pInline ); + hb_xfree( pInline ); } while( HB_COMP_PARAM->pFirstDeclared ) @@ -3882,10 +3882,10 @@ void hb_compCompileEnd( HB_COMP_DECL ) PCOMDECLARED pDeclared = HB_COMP_PARAM->pFirstDeclared; HB_COMP_PARAM->pFirstDeclared = pDeclared->pNext; if( pDeclared->cParamTypes ) - hb_xfree( ( void * ) pDeclared->cParamTypes ); + hb_xfree( pDeclared->cParamTypes ); if( pDeclared->pParamClasses ) - hb_xfree( ( void * ) pDeclared->pParamClasses ); - hb_xfree( ( void * ) pDeclared ); + hb_xfree( pDeclared->pParamClasses ); + hb_xfree( pDeclared ); } HB_COMP_PARAM->pLastDeclared = NULL; @@ -3898,12 +3898,12 @@ void hb_compCompileEnd( HB_COMP_DECL ) PCOMDECLARED pDeclared = pClass->pMethod; pClass->pMethod = pDeclared->pNext; if( pDeclared->cParamTypes ) - hb_xfree( ( void * ) pDeclared->cParamTypes ); + hb_xfree( pDeclared->cParamTypes ); if( pDeclared->pParamClasses ) - hb_xfree( ( void * ) pDeclared->pParamClasses ); - hb_xfree( ( void * ) pDeclared ); + hb_xfree( pDeclared->pParamClasses ); + hb_xfree( pDeclared ); } - hb_xfree( ( void * ) pClass ); + hb_xfree( pClass ); } HB_COMP_PARAM->pLastClass = NULL; @@ -3911,7 +3911,7 @@ void hb_compCompileEnd( HB_COMP_DECL ) { PCOMSYMBOL pSym = HB_COMP_PARAM->symbols.pFirst; HB_COMP_PARAM->symbols.pFirst = pSym->pNext; - hb_xfree( ( void * ) pSym ); + hb_xfree( pSym ); } } diff --git a/harbour/src/rtl/setkey.c b/harbour/src/rtl/setkey.c index b6d4bd10ef..f75aed280c 100644 --- a/harbour/src/rtl/setkey.c +++ b/harbour/src/rtl/setkey.c @@ -88,7 +88,7 @@ static void hb_setkeyRelease( void * cargo ) hb_itemRelease( sk_list->pIsActive ); sk_list_tmp = sk_list; sk_list = sk_list->next; - hb_xfree( ( void * ) sk_list_tmp ); + hb_xfree( sk_list_tmp ); } ( ( PHB_SK_DATA ) cargo )->sk_list = NULL; diff --git a/harbour/src/vm/cmdarg.c b/harbour/src/vm/cmdarg.c index b3aa252919..9633b9e289 100644 --- a/harbour/src/vm/cmdarg.c +++ b/harbour/src/vm/cmdarg.c @@ -233,7 +233,7 @@ void hb_cmdargUpdate( void ) hb_strncat( s_szAppName, pFName->szPath, HB_PATH_MAX - 1 ); pFName->szPath = hb_strdup( s_szAppName ); hb_fsFNameMerge( s_szAppName, pFName ); - hb_xfree( ( void * ) pFName->szPath ); + hb_xfree( pFName->szPath ); s_argv[ 0 ] = s_szAppName; } } @@ -309,7 +309,7 @@ static char * hb_cmdargGet( const char * pszName, HB_BOOL bRetValue ) if( !pszEnvVar || pszEnvVar[ 0 ] == '\0' ) { if( pszEnvVar ) - hb_xfree( ( void * ) pszEnvVar ); + hb_xfree( pszEnvVar ); pszEnvVar = hb_getenv( "CLIPPER" ); } @@ -370,7 +370,7 @@ static char * hb_cmdargGet( const char * pszName, HB_BOOL bRetValue ) } if( pszEnvVar ) - hb_xfree( ( void * ) pszEnvVar ); + hb_xfree( pszEnvVar ); return pszRetVal; }