From 8ef93ac2a1d47a2767c227178bf05767260ebaff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Czerpak?= Date: Sun, 19 Jan 2025 14:33:34 +0100 Subject: [PATCH] 2025-01-19 14:33 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * src/rdd/dbfcdx/dbfcdx1.c % Removed always false dummy condition. For pPage->TagParent->MaxKeys >= 2 && ( ( iKeys + pPage->TagParent->MaxKeys - 1 ) / pPage->TagParent->MaxKeys ) == 1 the expression iKeys > ( ( pPage->TagParent->MaxKeys * 3 ) >> 1 ) was alwas false. As side effect this modification pacifies the buggy GCC warnings. --- ChangeLog.txt | 11 +++++++++++ src/rdd/dbfcdx/dbfcdx1.c | 9 --------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 74da74dd2d..b436c487dc 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -7,6 +7,17 @@ Entries may not always be in chronological/commit order. See license at the end of file. */ +2025-01-19 14:33 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * src/rdd/dbfcdx/dbfcdx1.c + % Removed always false dummy condition. For + pPage->TagParent->MaxKeys >= 2 && + ( ( iKeys + pPage->TagParent->MaxKeys - 1 ) + / pPage->TagParent->MaxKeys ) == 1 + the expression + iKeys > ( ( pPage->TagParent->MaxKeys * 3 ) >> 1 ) + was alwas false. + As side effect this modification pacifies the buggy GCC warnings. + 2025-01-19 02:08 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * contrib/hbssl/hbssl.h * contrib/hbssl/rsa.c diff --git a/src/rdd/dbfcdx/dbfcdx1.c b/src/rdd/dbfcdx/dbfcdx1.c index b745bcb5fc..12060b26df 100644 --- a/src/rdd/dbfcdx/dbfcdx1.c +++ b/src/rdd/dbfcdx/dbfcdx1.c @@ -3068,15 +3068,6 @@ static int hb_cdxPageKeyIntBalance( LPCDXPAGE pPage, int iChildRet ) } iNeedKeys = ( iKeys + pPage->TagParent->MaxKeys - 1 ) / pPage->TagParent->MaxKeys; -#if 1 - if( iNeedKeys == 1 && iBlncKeys > 1 && childs[ 0 ]->Left != CDX_DUMMYNODE && - childs[ iBlncKeys - 1 ]->Right != CDX_DUMMYNODE && - iKeys >= ( CDX_BALANCE_INTPAGES << 1 ) && - iKeys > ( ( pPage->TagParent->MaxKeys * 3 ) >> 1 ) ) - { - iNeedKeys = 2; - } -#endif #if 1 iDiv = HB_MAX( iMax - iMin - ( pPage->TagParent->MaxKeys >> 1 ) + 1, iBlncKeys - iNeedKeys );