From 26c617c979bb83e2f90338621dbface288cd166f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Czerpak?= Date: Sun, 22 Mar 2015 17:23:43 +0100 Subject: [PATCH] 2015-03-22 17:23 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * src/rdd/dbf1.c * pacified warnings --- ChangeLog.txt | 4 ++++ src/rdd/dbf1.c | 14 +++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 055e54b23f..95a29c9e62 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,10 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2015-03-22 17:23 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * src/rdd/dbf1.c + * pacified warnings + 2015-03-21 12:54 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * src/rdd/dbf1.c ! restored the line with initialization of allocated memory buffer diff --git a/src/rdd/dbf1.c b/src/rdd/dbf1.c index 20497c5fda..489e2944e9 100644 --- a/src/rdd/dbf1.c +++ b/src/rdd/dbf1.c @@ -4912,8 +4912,8 @@ typedef struct PHB_FILE pTempFile; char * szTempFileName; - HB_SIZE nPages; - HB_SIZE nMaxPage; + HB_SORTIDX nPages; + HB_SORTIDX nMaxPage; PHB_DBSORTPAGE pSwapPages; HB_DBRECNO nCount; @@ -5150,7 +5150,7 @@ static HB_DBRECNO * hb_dbfSortSort( LPDBSORTREC pSortRec ) pSortRec->pnIndex = ( HB_SORTIDX * ) hb_xgrab( ( ( HB_SIZE ) pSortRec->nCount << 1 ) * sizeof( HB_SORTIDX ) ); for( nCount = 0; nCount < pSortRec->nCount; ++nCount ) - pSortRec->pnIndex[ nCount ] = nCount; + pSortRec->pnIndex[ nCount ] = ( HB_SORTIDX ) nCount; pOrder = pSortRec->pnIndex; if( ! hb_dbfSortQSort( pSortRec, pOrder, &pSortRec->pnIndex[ pSortRec->nCount ], @@ -5221,7 +5221,7 @@ static HB_ERRCODE hb_dbfSortWritePage( LPDBSORTREC pSortRec ) { pSortRec->nMaxPage += 8; pSortRec->pSwapPages = ( PHB_DBSORTPAGE ) hb_xrealloc( pSortRec->pSwapPages, - pSortRec->nMaxPage * sizeof( HB_DBSORTPAGE ) ); + pSortRec->nMaxPage * sizeof( HB_DBSORTPAGE ) ); } memset( &pSortRec->pSwapPages[ pSortRec->nPages ], 0, sizeof( HB_DBSORTPAGE ) ); pSortRec->pSwapPages[ pSortRec->nPages ].nCount = pSortRec->nCount; @@ -5453,10 +5453,10 @@ static HB_ERRCODE hb_dbfSortAdd( LPDBSORTREC pSortRec ) */ static HB_ERRCODE hb_dbfSort( DBFAREAP pArea, LPDBSORTINFO pSortInfo ) { - HB_ERRCODE errCode = HB_SUCCESS; - HB_LONG lNext = 1; - HB_BOOL fEof, fFor; DBSORTREC dbSortRec; + HB_BOOL fEof, fFor; + HB_ERRCODE errCode; + HB_LONG lNext = 1; HB_TRACE( HB_TR_DEBUG, ( "hb_dbfSort(%p, %p)", pArea, pSortInfo ) );