2010-06-21 16:47 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/src/rtl/filesys.c
    * removed HAVE_POSIX_IO and HB_FS_FILE_IO macros
    * replaced !HB_FS_LARGE_OPTIMIZED macro with HB_FS_IO_16BIT
    * cleaned code covered by HB_FS_IO_16BIT
    ! fixed some direct castings between DWORD* and HB_SIZE*
    ! fixed direct casting from BOOL to HB_BOOL

  * harbour/src/rtl/gtcrs/gtcrs.c
  * harbour/src/rtl/cdpapi.c
  * harbour/src/rtl/gtsln/gtsln.c
  * harbour/src/rdd/dbfntx/dbfntx1.c
  * harbour/src/rdd/dbfnsx/dbfnsx1.c
  * harbour/src/compiler/hbopt.c
  * harbour/src/compiler/gencc.c
  * harbour/contrib/xhb/fparse.c
    * pacified CLANG warnings
This commit is contained in:
Przemyslaw Czerpak
2010-06-21 14:47:39 +00:00
parent da2d18d622
commit 70e0ef5890
10 changed files with 618 additions and 852 deletions

View File

@@ -16,6 +16,24 @@
The license applies to all entries newer than 2009-04-28.
*/
2010-06-21 16:47 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/rtl/filesys.c
* removed HAVE_POSIX_IO and HB_FS_FILE_IO macros
* replaced !HB_FS_LARGE_OPTIMIZED macro with HB_FS_IO_16BIT
* cleaned code covered by HB_FS_IO_16BIT
! fixed some direct castings between DWORD* and HB_SIZE*
! fixed direct casting from BOOL to HB_BOOL
* harbour/src/rtl/gtcrs/gtcrs.c
* harbour/src/rtl/cdpapi.c
* harbour/src/rtl/gtsln/gtsln.c
* harbour/src/rdd/dbfntx/dbfntx1.c
* harbour/src/rdd/dbfnsx/dbfnsx1.c
* harbour/src/compiler/hbopt.c
* harbour/src/compiler/gencc.c
* harbour/contrib/xhb/fparse.c
* pacified CLANG warnings
2010-06-20 15:24 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/vm/thread.c
* Added casts to pacify msvc64 warnings.

View File

@@ -261,7 +261,7 @@ void hb_ParseLine( PHB_ITEM pReturn, const char * szText, int iDelimiter, int *
}
/*----------------------------------------------------------------------------*/
static char ** hb_tokensplit( char * string, HB_BYTE delimiter, int iCharCount, int * iWord )
static char ** hb_tokensplit( const char * string, HB_BYTE delimiter, int iCharCount, int * iWord )
{
char *buffer, *bufptr;
char **token_list;
@@ -274,9 +274,9 @@ static char ** hb_tokensplit( char * string, HB_BYTE delimiter, int iCharCount,
while( *string )
{
if( *string == delimiter )
if( ( HB_BYTE ) *string == delimiter )
{
while( *string == delimiter )
while( ( HB_BYTE ) *string == delimiter )
{
string++;
}

View File

@@ -454,7 +454,7 @@ static HB_GENC_FUNC( hb_p_frame )
{
HB_GENC_LABEL();
fprintf( cargo->yyc, "\thb_xvmFrame( %hu, %hu );\n",
fprintf( cargo->yyc, "\thb_xvmFrame( %u, %u );\n",
pFunc->pCode[ lPCodePos + 1 ], pFunc->pCode[ lPCodePos + 2 ] );
return 3;
}
@@ -926,7 +926,7 @@ static HB_GENC_FUNC( hb_p_popaliasedfieldnear )
{
HB_GENC_LABEL();
fprintf( cargo->yyc, "\tif( hb_xvmPopAliasedField( symbols + %hu ) ) break;\n",
fprintf( cargo->yyc, "\tif( hb_xvmPopAliasedField( symbols + %u ) ) break;\n",
pFunc->pCode[ lPCodePos + 1 ] );
return 2;
}
@@ -2105,7 +2105,7 @@ static HB_GENC_FUNC( hb_p_vframe )
{
HB_GENC_LABEL();
fprintf( cargo->yyc, "\thb_xvmVFrame( %hu, %hu );\n",
fprintf( cargo->yyc, "\thb_xvmVFrame( %u, %u );\n",
pFunc->pCode[ lPCodePos + 1 ], pFunc->pCode[ lPCodePos + 2 ] );
return 3;
}
@@ -2114,7 +2114,7 @@ static HB_GENC_FUNC( hb_p_largeframe )
{
HB_GENC_LABEL();
fprintf( cargo->yyc, "\thb_xvmFrame( %hu, %hu );\n",
fprintf( cargo->yyc, "\thb_xvmFrame( %u, %u );\n",
HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ),
pFunc->pCode[ lPCodePos + 3 ] );
return 4;
@@ -2124,7 +2124,7 @@ static HB_GENC_FUNC( hb_p_largevframe )
{
HB_GENC_LABEL();
fprintf( cargo->yyc, "\thb_xvmVFrame( %hu, %hu );\n",
fprintf( cargo->yyc, "\thb_xvmVFrame( %u, %u );\n",
HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ),
pFunc->pCode[ lPCodePos + 3 ] );
return 4;

View File

@@ -1397,7 +1397,7 @@ static void hb_compPCodeEnumAssignedUnused( HB_COMP_DECL, PFUNCTION pFunc, PHB_O
}
}
if( fCheck && ( isLocal = hb_compLocalGetNumber( &pFunc->pCode[ ulPos ] ) ) > pFunc->wParamCount )
if( fCheck && ( isLocal = hb_compLocalGetNumber( &pFunc->pCode[ ulPos ] ) ) > ( HB_SHORT ) pFunc->wParamCount )
{
PVAR pVar = pFunc->pLocals;
HB_SHORT is;
@@ -1507,7 +1507,8 @@ static void hb_compPCodeEnumRenumberLocals( PFUNCTION pFunc, PHB_OPT_LOCAL pLoca
case HB_P_PUSHBLOCKLARGE:
{
HB_BYTE * pVar = &pFunc->pCode[ ulPos + 5 ];
HB_USHORT usVarCount, isVar;
HB_USHORT usVarCount;
HB_SHORT isVar;
if( pFunc->pCode[ ulPos ] == HB_P_PUSHBLOCKLARGE )
pVar++;

View File

@@ -2624,7 +2624,7 @@ static HB_BOOL hb_nsxTagNextKey( LPTAGINFO pTag )
pPage = hb_nsxPageLoad( pTag, pTag->stack[ iLevel ].page );
if( ! pPage )
return HB_FALSE;
if( pPage->uiKeys && pTag->stack[ iLevel ].ikey < pPage->uiKeys )
if( pPage->uiKeys && pTag->stack[ iLevel ].ikey < ( HB_SHORT ) pPage->uiKeys )
{
if( !pTag->stack[ iLevel ].value )
pTag->stack[ iLevel ].value = ( HB_UCHAR * ) hb_xgrab( pTag->KeyLength );
@@ -3232,7 +3232,7 @@ static HB_BOOL hb_nsxTagKeyAdd( LPTAGINFO pTag, LPKEYINFO pKey )
pPage = hb_nsxPageBottomMove( pTag, ulPage );
if( ! pPage )
return HB_FALSE;
if( pTag->stack[ pTag->stackLevel - 1 ].ikey < pPage->uiKeys )
if( pTag->stack[ pTag->stackLevel - 1 ].ikey < ( HB_SHORT ) pPage->uiKeys )
pTag->stack[ pTag->stackLevel - 1 ].ikey++;
}

View File

@@ -2380,7 +2380,7 @@ static HB_BOOL hb_ntxTagNextKey( LPTAGINFO pTag )
pPage = hb_ntxPageLoad( pTag, pTag->stack[ iLevel ].page );
if( ! pPage )
return HB_FALSE;
if( pTag->stack[ iLevel ].ikey < pPage->uiKeys )
if( pTag->stack[ iLevel ].ikey < ( HB_SHORT ) pPage->uiKeys )
ulPage = hb_ntxGetKeyPage( pPage, pTag->stack[ iLevel ].ikey + 1 );
if( ulPage || pTag->stack[ iLevel ].ikey + 1 < pPage->uiKeys )
{
@@ -2401,7 +2401,7 @@ static HB_BOOL hb_ntxTagNextKey( LPTAGINFO pTag )
pPage = hb_ntxPageLoad( pTag, pTag->stack[ iLevel ].page );
if( ! pPage )
return HB_FALSE;
if( pTag->stack[ iLevel ].ikey < pPage->uiKeys )
if( pTag->stack[ iLevel ].ikey < ( HB_SHORT ) pPage->uiKeys )
break;
}
if( iLevel < 0 )
@@ -2517,7 +2517,7 @@ static int hb_ntxPageKeyFind( LPTAGINFO pTag, LPPAGEINFO pPage,
iEnd = i - 1;
}
}
return iLast >= 0 ? iLast : pPage->uiKeys;
return iLast >= 0 ? iLast : ( int ) pPage->uiKeys;
}
/*
@@ -2938,7 +2938,7 @@ static HB_BOOL hb_ntxTagKeyAdd( LPTAGINFO pTag, LPKEYINFO pKey )
if( ! pPage )
return HB_FALSE;
iLevel = pTag->stackLevel - 1;
if( pTag->stack[ iLevel ].ikey < pPage->uiKeys )
if( pTag->stack[ iLevel ].ikey < ( HB_SHORT ) pPage->uiKeys )
pTag->stack[ iLevel ].ikey++;
}
}

View File

@@ -1748,8 +1748,8 @@ static PHB_CODEPAGE hb_buildCodePage( const char * id, const char * info,
ucLo = ( HB_UCHAR ) *plo;
if( ( ucUp != ' ' || ucLo != ' ' ) &&
( ucUp == *pup || ( ucUp != ' ' && *pup != ' ' ) ) &&
( ucLo == *plo || ( ucLo != ' ' && *plo != ' ' ) ) )
( ucUp == ( HB_UCHAR ) *pup || ( ucUp != ' ' && *pup != ' ' ) ) &&
( ucLo == ( HB_UCHAR ) *plo || ( ucLo != ' ' && *plo != ' ' ) ) )
{
if( ucUp != ' ' )
++iSortLo;

File diff suppressed because it is too large Load Diff

View File

@@ -1339,7 +1339,7 @@ static void disp_cursor( InOutBase * ioBase )
{
if ( ioBase->terminal_type == TERM_LINUX )
{
hb_snprintf( escseq, sizeof( escseq ), "\033[?25%c\033[?%hdc",
hb_snprintf( escseq, sizeof( escseq ), "\033[?25%c\033[?%dc",
ioBase->cursor == SC_NONE ? 'l' : 'h', lcurs );
write_ttyseq( ioBase, escseq );
}
@@ -1703,7 +1703,7 @@ static void gt_tone( InOutBase * ioBase, double dFrequency, double dDuration )
if ( ioBase->terminal_type == TERM_LINUX && ioBase->beep != NULL )
{
hb_snprintf( escseq, sizeof( escseq ), "\033[10;%hd]\033[11;%hd]%s",
hb_snprintf( escseq, sizeof( escseq ), "\033[10;%d]\033[11;%d]%s",
( int ) dFrequency,
( int ) ( dDuration * 1000.0 / 18.2 ), ioBase->beep );
write_ttyseq( ioBase, escseq );
@@ -1814,7 +1814,7 @@ static int gt_setsize( InOutBase * ioBase, int rows, int cols )
if ( ioBase->terminal_type == TERM_XTERM )
{
hb_snprintf( escseq, sizeof( escseq ), "\033[8;%hd;%hdt", rows, cols );
hb_snprintf( escseq, sizeof( escseq ), "\033[8;%d;%dt", rows, cols );
write_ttyseq( ioBase, escseq );
/* dirty hack - wait for SIGWINCH */
if ( gt_getsize( ioBase, &r, &c ) > 0 )

View File

@@ -803,9 +803,9 @@ static void hb_gt_sln_Tone( PHB_GT pGT, double dFrequency, double dDuration )
char escstr[ 64 ];
dFrequency = HB_MIN( HB_MAX( 0.0, dFrequency ), 32767.0 );
hb_snprintf( escstr, 63, "\033[10;%hd]", ( int )dFrequency );
hb_snprintf( escstr, 63, "\033[10;%d]", ( int ) dFrequency );
SLtt_write_string( escstr );
hb_snprintf( escstr, 63, "\033[11;%hd]", ( int )( dDuration * 1000.0 / 18.2 ) );
hb_snprintf( escstr, 63, "\033[11;%d]", ( int ) ( dDuration * 1000.0 / 18.2 ) );
SLtt_write_string( escstr );
SLtt_flush_output();
}