1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
|
--- a/fsck_hfs.tproj/dfalib/SControl.c
+++ b/fsck_hfs.tproj/dfalib/SControl.c
@@ -1034,7 +1034,7 @@
btcbP = (BTreeControlBlock*)fcbP->fcbBtree;
if ( btcbP != nil)
{
- if( btcbP->refCon != (UInt32)nil )
+ if( btcbP->refCon != nil )
{
if(((BTreeExtensionsRec*)btcbP->refCon)->BTCBMPtr != nil)
{
@@ -1043,13 +1043,13 @@
}
DisposeMemory( (Ptr)btcbP->refCon );
err = MemError();
- btcbP->refCon = (UInt32)nil;
+ btcbP->refCon = nil;
}
fcbP = GPtr->calculatedCatalogFCB; // release catalog BTree bit map
btcbP = (BTreeControlBlock*)fcbP->fcbBtree;
- if( btcbP->refCon != (UInt32)nil )
+ if( btcbP->refCon != nil )
{
if(((BTreeExtensionsRec*)btcbP->refCon)->BTCBMPtr != nil)
{
@@ -1058,7 +1058,7 @@
}
DisposeMemory( (Ptr)btcbP->refCon );
err = MemError();
- btcbP->refCon = (UInt32)nil;
+ btcbP->refCon = nil;
}
}
}
--- a/fsck_hfs.tproj/dfalib/SVerify1.c
+++ b/fsck_hfs.tproj/dfalib/SVerify1.c
@@ -789,8 +789,8 @@
//
// set up our DFA extended BTCB area. Will we have enough memory on all HFS+ volumes.
//
- btcb->refCon = (UInt32) AllocateClearMemory( sizeof(BTreeExtensionsRec) ); // allocate space for our BTCB extensions
- if ( btcb->refCon == (UInt32) nil ) {
+ btcb->refCon = AllocateClearMemory( sizeof(BTreeExtensionsRec) ); // allocate space for our BTCB extensions
+ if ( btcb->refCon == nil ) {
err = R_NoMem;
goto exit;
}
@@ -1144,8 +1144,8 @@
// set up our DFA extended BTCB area. Will we have enough memory on all HFS+ volumes.
//
- btcb->refCon = (UInt32) AllocateClearMemory( sizeof(BTreeExtensionsRec) ); // allocate space for our BTCB extensions
- if ( btcb->refCon == (UInt32)nil ) {
+ btcb->refCon = AllocateClearMemory( sizeof(BTreeExtensionsRec) ); // allocate space for our BTCB extensions
+ if ( btcb->refCon == nil ) {
err = R_NoMem;
goto exit;
}
@@ -1779,8 +1779,8 @@
//
// set up our DFA extended BTCB area. Will we have enough memory on all HFS+ volumes.
//
- btcb->refCon = (UInt32) AllocateClearMemory( sizeof(BTreeExtensionsRec) ); // allocate space for our BTCB extensions
- if ( btcb->refCon == (UInt32)nil ) {
+ btcb->refCon = AllocateClearMemory( sizeof(BTreeExtensionsRec) ); // allocate space for our BTCB extensions
+ if ( btcb->refCon == nil ) {
err = R_NoMem;
goto exit;
}
@@ -1793,7 +1793,7 @@
}
else
{
- if ( btcb->refCon == (UInt32)nil ) {
+ if ( btcb->refCon == nil ) {
err = R_NoMem;
goto exit;
}
--- a/fsck_hfs.tproj/dfalib/BTreePrivate.h
+++ b/fsck_hfs.tproj/dfalib/BTreePrivate.h
@@ -104,6 +104,9 @@
///////////////////////////////////// Types /////////////////////////////////////
+// Forward declaration from Scavenger.h
+struct BTreeExtensionsRec;
+
typedef struct BTreeControlBlock { // fields specific to BTree CBs
UInt8 keyCompareType; /* Key string Comparison Type */
@@ -144,7 +147,7 @@
UInt32 numPossibleHints; // Looks like a formated hint
UInt32 numValidHints; // Hint used to find correct record.
- UInt32 refCon; // Used by DFA to point to private data.
+ struct BTreeExtensionsRec *refCon; // Used by DFA to point to private data.
SFCB *fcbPtr; // fcb of btree file
} BTreeControlBlock, *BTreeControlBlockPtr;
--- a/fsck_hfs.tproj/dfalib/hfs_endian.c
+++ b/fsck_hfs.tproj/dfalib/hfs_endian.c
@@ -437,7 +437,7 @@
BTNodeDescriptor *srcDesc = src->buffer;
UInt16 *srcOffs = (UInt16 *)((char *)src->buffer + (src->blockSize - (srcDesc->numRecords * sizeof (UInt16))));
char *nextRecord; /* Points to start of record following current one */
- UInt32 i;
+ int i;
UInt32 j;
if (fileID == kHFSExtentsFileID) {
|