2024-01-28 12:50 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)

* contrib/hbfimage/core.c
    * use FreeImage_Rotate() instead of FreeImage_RotateClassic() in new
      FreeImage versions which do not support this function

  * contrib/hbsqlit3/core.c
    * added missing casting reported as bug in C++ mode

  * contrib/hbssl/hbssl.h
  * contrib/hbssl/rsa.c
    * added HB_SSL_CONST_BYTE() macro to pacify unconst warnings
      in old SSL versions

  * src/rdd/wacore.c
    * inlined macro to pacify still returning false warning
This commit is contained in:
Przemysław Czerpak
2024-01-28 12:50:51 +01:00
parent 8405632197
commit ae62f2effe
6 changed files with 31 additions and 8 deletions

View File

@@ -7,6 +7,22 @@
Entries may not always be in chronological/commit order. Entries may not always be in chronological/commit order.
See license at the end of file. */ See license at the end of file. */
2024-01-28 12:50 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbfimage/core.c
* use FreeImage_Rotate() instead of FreeImage_RotateClassic() in new
FreeImage versions which do not support this function
* contrib/hbsqlit3/core.c
* added missing casting reported as bug in C++ mode
* contrib/hbssl/hbssl.h
* contrib/hbssl/rsa.c
* added HB_SSL_CONST_BYTE() macro to pacify unconst warnings
in old SSL versions
* src/rdd/wacore.c
* inlined macro to pacify still returning false warning
2023-12-08 23:17 UTC+0100 Phil Krylov (phil a t krylov.eu) 2023-12-08 23:17 UTC+0100 Phil Krylov (phil a t krylov.eu)
* contrib/sddsqlt3/core.c * contrib/sddsqlt3/core.c
! Fixed a different signedness compare warning. ! Fixed a different signedness compare warning.

View File

@@ -1231,7 +1231,11 @@ HB_FUNC( FI_ROTATECLASSIC )
FIBITMAP * dib = hb_FIBITMAP_par( 1 ); FIBITMAP * dib = hb_FIBITMAP_par( 1 );
double angle = hb_parnd( 2 ); double angle = hb_parnd( 2 );
#if FREEIMAGE_MAJOR_VERSION > 3 || ( FREEIMAGE_MAJOR_VERSION >= 3 && FREEIMAGE_MINOR_VERSION >= 18 )
hb_FIBITMAP_ret( FreeImage_Rotate( dib, angle, NULL ), HB_TRUE );
#else
hb_FIBITMAP_ret( FreeImage_RotateClassic( dib, angle ), HB_TRUE ); hb_FIBITMAP_ret( FreeImage_RotateClassic( dib, angle ), HB_TRUE );
#endif
} }
else else
hb_errRT_BASE_SubstR( EG_ARG, 0, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); hb_errRT_BASE_SubstR( EG_ARG, 0, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );

View File

@@ -1830,7 +1830,7 @@ static int trace_handler( unsigned uType, void *cbTraceHandler, void * p, void *
{ {
case SQLITE_TRACE_STMT: case SQLITE_TRACE_STMT:
hb_vmPushPointer( p ); hb_vmPushPointer( p );
hb_vmPushString( x, strlen( x ) ); hb_vmPushString( ( const char * ) x, strlen( ( char * ) x ) );
hb_vmSend( 3 ); hb_vmSend( 3 );
break; break;
case SQLITE_TRACE_PROFILE: case SQLITE_TRACE_PROFILE:
@@ -1849,7 +1849,7 @@ static int trace_handler( unsigned uType, void *cbTraceHandler, void * p, void *
HB_SQLITE3 * hbsqlite3 = ( HB_SQLITE3 * ) hb_xgrabz( sizeof( HB_SQLITE3 ) ); HB_SQLITE3 * hbsqlite3 = ( HB_SQLITE3 * ) hb_xgrabz( sizeof( HB_SQLITE3 ) );
HB_SYMBOL_UNUSED( x ); HB_SYMBOL_UNUSED( x );
hbsqlite3->db = p; hbsqlite3->db = ( sqlite3 * ) p;
hb_sqlite3_itemPut( pItem, hbsqlite3, HB_SQLITE3_DB ); hb_sqlite3_itemPut( pItem, hbsqlite3, HB_SQLITE3_DB );
hb_vmPush( pItem ); hb_vmPush( pItem );
hb_vmSend( 2 ); hb_vmSend( 2 );

View File

@@ -169,8 +169,10 @@
declarations in OpenSSL prior 0.9.8 */ declarations in OpenSSL prior 0.9.8 */
#if OPENSSL_VERSION_NUMBER < 0x0090800fL #if OPENSSL_VERSION_NUMBER < 0x0090800fL
#define HB_SSL_CONST #define HB_SSL_CONST
#define HB_SSL_CONST_BYTE( x ) ( ( unsigned char * ) ( x ) )
#else #else
#define HB_SSL_CONST const #define HB_SSL_CONST const
#define HB_SSL_CONST_BYTE( x ) ( ( const unsigned char * ) ( x ) )
#endif #endif
HB_EXTERN_BEGIN HB_EXTERN_BEGIN

View File

@@ -114,7 +114,7 @@ HB_FUNC( RSA_PUBLIC_ENCRYPT )
buffer = ( unsigned char * ) hb_xgrab( RSA_size( rsa ) + 1 ); buffer = ( unsigned char * ) hb_xgrab( RSA_size( rsa ) + 1 );
ret = RSA_public_encrypt( flen, HB_UNCONST( from ), buffer, rsa, padding ); ret = RSA_public_encrypt( flen, HB_SSL_CONST_BYTE( from ), buffer, rsa, padding );
if( ret > 0 ) if( ret > 0 )
{ {
if( ! hb_storclen_buffer( ( char * ) buffer, ret, 3 ) ) if( ! hb_storclen_buffer( ( char * ) buffer, ret, 3 ) )
@@ -146,7 +146,7 @@ HB_FUNC( RSA_PRIVATE_DECRYPT )
buffer = ( unsigned char * ) hb_xgrab( RSA_size( rsa ) + 1 ); buffer = ( unsigned char * ) hb_xgrab( RSA_size( rsa ) + 1 );
ret = RSA_private_decrypt( flen, HB_UNCONST( from ), buffer, rsa, padding ); ret = RSA_private_decrypt( flen, HB_SSL_CONST_BYTE( from ), buffer, rsa, padding );
if( ret > 0 ) if( ret > 0 )
{ {
buffer = ( unsigned char * ) hb_xrealloc( buffer, ret + 1 ); buffer = ( unsigned char * ) hb_xrealloc( buffer, ret + 1 );
@@ -179,7 +179,7 @@ HB_FUNC( RSA_PRIVATE_ENCRYPT )
buffer = ( unsigned char * ) hb_xgrab( RSA_size( rsa ) + 1 ); buffer = ( unsigned char * ) hb_xgrab( RSA_size( rsa ) + 1 );
ret = RSA_private_encrypt( flen, HB_UNCONST( from ), buffer, rsa, padding ); ret = RSA_private_encrypt( flen, HB_SSL_CONST_BYTE( from ), buffer, rsa, padding );
if( ret > 0 ) if( ret > 0 )
{ {
if( ! hb_storclen_buffer( ( char * ) buffer, ret, 3 ) ) if( ! hb_storclen_buffer( ( char * ) buffer, ret, 3 ) )
@@ -211,7 +211,7 @@ HB_FUNC( RSA_PUBLIC_DECRYPT )
buffer = ( unsigned char * ) hb_xgrab( RSA_size( rsa ) + 1 ); buffer = ( unsigned char * ) hb_xgrab( RSA_size( rsa ) + 1 );
ret = RSA_public_decrypt( flen, HB_UNCONST( from ), buffer, rsa, padding ); ret = RSA_public_decrypt( flen, HB_SSL_CONST_BYTE( from ), buffer, rsa, padding );
if( ret > 0 ) if( ret > 0 )
{ {
buffer = ( unsigned char * ) hb_xrealloc( buffer, ret + 1 ); buffer = ( unsigned char * ) hb_xrealloc( buffer, ret + 1 );

View File

@@ -297,7 +297,8 @@ void hb_rddCloseAll( void )
hb_xfree( pRddInfo->waNums ); hb_xfree( pRddInfo->waNums );
pRddInfo->waList = NULL; pRddInfo->waList = NULL;
pRddInfo->waNums = NULL; pRddInfo->waNums = NULL;
HB_SET_WA( 1 ); pRddInfo->uiCurrArea = 1;
pRddInfo->pCurrArea = NULL;
} }
} }