2025-09-09 19:55 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)

* contrib/hbbmp/core.c
    ! pacified BCC warnings

  * src/vm/macro.c
    * minor modification to test if it can pacify false warning in recent GCC
This commit is contained in:
Przemysław Czerpak
2025-09-09 19:55:30 +02:00
parent c184fb933e
commit dbfbc756d7
3 changed files with 21 additions and 14 deletions

View File

@@ -7,6 +7,13 @@
Entries may not always be in chronological/commit order.
See license at the end of file. */
2025-09-09 19:55 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbbmp/core.c
! pacified BCC warnings
* src/vm/macro.c
* minor modification to test if it can pacify false warning in recent GCC
2025-09-09 18:58 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/3rd/png/pngrutil.c
! moved PNG_UNUSED() before return statement to avoid BCC W8070 Warning

View File

@@ -268,13 +268,13 @@ HB_MAXINT hb_bmp_color( PHB_BMPINFO pBMP, int r, int g, int b, int a )
}
if( iColor == -1 )
{
if( pBMP->clrused < 1 << pBMP->depth )
if( pBMP->clrused < ( 1 << pBMP->depth ) )
{
iColor = pBMP->clrused++;
pBMP->palette[ iColor ].blue = b;
pBMP->palette[ iColor ].green = g;
pBMP->palette[ iColor ].red = r;
pBMP->palette[ iColor ].alpha = a;
pBMP->palette[ iColor ].blue = ( HB_BYTE ) b;
pBMP->palette[ iColor ].green = ( HB_BYTE ) g;
pBMP->palette[ iColor ].red = ( HB_BYTE ) r;
pBMP->palette[ iColor ].alpha = ( HB_BYTE ) a;
}
else
pBMP->error = HB_BMP_ERROR_PALETTEFULL;
@@ -301,10 +301,10 @@ HB_BOOL hb_bmp_color2rgb( PHB_BMPINFO pBMP, HB_MAXINT clr, int * r, int * g, int
case 8:
if( clr < ( HB_MAXINT ) pBMP->clrused )
{
* b = pBMP->palette[ clr ].blue;
* g = pBMP->palette[ clr ].green;
* r = pBMP->palette[ clr ].red;
* a = pBMP->palette[ clr ].alpha;
* b = ( int ) pBMP->palette[ clr ].blue;
* g = ( int ) pBMP->palette[ clr ].green;
* r = ( int ) pBMP->palette[ clr ].red;
* a = ( int ) pBMP->palette[ clr ].alpha;
pBMP->error = 0;
}
break;
@@ -552,7 +552,7 @@ PHB_BMPINFO hb_bmp_decode( const HB_BYTE * data, HB_SIZE size, int * piError )
*/
int bmpoffset = HB_GET_LE_INT32( header->bmpoffset ),
headersize = HB_GET_LE_INT32( header->headersize ),
width = 0, height = 0, depth = 0, rowlen = 0, dpi = 0,
width = 0, height = 0, depth = 0, rowlen, dpi = 0,
clrused = 0, palette_bytes = 0;
HB_BOOL fromtop;
@@ -795,8 +795,8 @@ HB_FUNC( HB_BMP_FROMBITMAP )
fromtop = HB_FALSE;
}
if( ! bitmap || ( align & ( align - 1 ) ) != 0 ||
( HB_SIZE ) ( ( ( width * depth + align - 1 ) & ~( align - 1 ) ) *
height + 0x07 ) >> 3 > hb_parclen( 1 ) )
( HB_SIZE ) ( ( ( ( width * depth + align - 1 ) & ~( align - 1 ) ) *
height + 0x07 ) >> 3 ) > hb_parclen( 1 ) )
iError = HB_BMP_ERROR_PARAM;
else
{

View File

@@ -745,8 +745,8 @@ char * hb_macroTextSymbol( const char * szString, HB_SIZE nLength, HB_BOOL * pfN
{
if( szResult == szString )
{
szResult = ( char * ) hb_xgrab( nLength + 1 );
memcpy( szResult, szString, nLength );
szResult = ( char * ) memcpy( hb_xgrab( nLength + 1 ),
szString, nLength );
szResult[ nLength ] = '\0';
}
szResult[ nLen ] = c - ( 'a' - 'A' );