From 424968243fa9b0877ba8fe52608cdd7c164ac0c4 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 12 May 2011 07:34:57 +0000 Subject: [PATCH] 2011-05-12 09:34 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * src/pp/ppcore.c * hb_xgrab( nSize ) -> hb_xgrab( nSize * sizeof( char ) ) trying to make flto warning disappear to no avail * contrib/hbexpat/unitable.prg ! static -> thread static --- harbour/ChangeLog | 10 +++++++++- harbour/contrib/hbexpat/unitable.prg | 12 ++++++------ harbour/src/pp/ppcore.c | 2 +- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index bdc5e65127..19ab3ed145 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,14 @@ The license applies to all entries newer than 2009-04-28. */ +2011-05-12 09:34 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * src/pp/ppcore.c + * hb_xgrab( nSize ) -> hb_xgrab( nSize * sizeof( char ) ) + trying to make flto warning disappear to no avail + + * contrib/hbexpat/unitable.prg + ! static -> thread static + 2011-05-11 22:31 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbwin/wapi_winuser.c * contrib/hbwin/hbwin.hbx @@ -930,7 +938,7 @@ * contrib/hbqt/qtcore/hbqt_pointer.cpp % Further simplified, cleaned, optimized, recursive call unrolled. - ; TODO: Leave only one of these: + ; TODO: Leave only one of these: [DONE] void * hbqt_par_obj( int iParam ) void * hbqt_gcpointer( int iParam ) void * hbqt_pPtrFromObj( int iParam ) diff --git a/harbour/contrib/hbexpat/unitable.prg b/harbour/contrib/hbexpat/unitable.prg index f560734701..f8a5c6fbb4 100644 --- a/harbour/contrib/hbexpat/unitable.prg +++ b/harbour/contrib/hbexpat/unitable.prg @@ -55,21 +55,21 @@ #define _UNI_NAME_NORM( s ) StrTran( StrTran( StrTran( s, "-" ), "." ), " " ) FUNCTION hb_xml_get_unicode_table( cCP ) - STATIC s_uni := NIL + THREAD STATIC t_uni := NIL LOCAL cdp - IF s_uni == NIL + IF t_uni == NIL /* Gather full list of unicode tables supported by codepage modules. */ - s_uni := { => } + t_uni := { => } FOR EACH cdp IN hb_cdpList() - s_uni[ _UNI_NAME_NORM( hb_cdpUniID( cdp ) ) ] := cdp + t_uni[ _UNI_NAME_NORM( hb_cdpUniID( cdp ) ) ] := cdp NEXT ENDIF cCP := _UNI_NAME_NORM( cCP ) - IF cCP $ s_uni - RETURN __hb_xml_cdpu16map( s_uni[ cCP ] ) + IF cCP $ t_uni + RETURN __hb_xml_cdpu16map( t_uni[ cCP ] ) ENDIF RETURN NIL diff --git a/harbour/src/pp/ppcore.c b/harbour/src/pp/ppcore.c index 714a261aec..7ecb74a575 100644 --- a/harbour/src/pp/ppcore.c +++ b/harbour/src/pp/ppcore.c @@ -2212,7 +2212,7 @@ static void hb_pp_pragmaStreamFile( PHB_PP_STATE pState, const char * szFileName if( nSize ) { - char * pBuffer = ( char * ) hb_xgrab( nSize ); + char * pBuffer = ( char * ) hb_xgrab( nSize * sizeof( char ) ); nSize = ( HB_SIZE ) fread( pBuffer, sizeof( char ), nSize, pFile->file_in ); if( pState->iStreamDump == HB_PP_STREAM_C )