diff -r d8d70de2bd36 -r 57b9594f5772 userlibandfileserver/fileserver/shostmassstorage/msproxy/hostusbmsproxy.cpp --- a/userlibandfileserver/fileserver/shostmassstorage/msproxy/hostusbmsproxy.cpp Wed Aug 18 11:08:29 2010 +0300 +++ b/userlibandfileserver/fileserver/shostmassstorage/msproxy/hostusbmsproxy.cpp Thu Sep 02 21:54:16 2010 +0300 @@ -55,10 +55,10 @@ partitionInfo.Close(); return r; } - TUint8 *iIntBuf = (TUint8 *) partitionInfo.Ptr(); + TUint8* buffer = const_cast(partitionInfo.Ptr()); // Read of the first sector successful so check for a Master Boot Record - if (*(TUint16*)(&iIntBuf[KMBRSignatureOffset])!= KMBRSignature) + if (*(reinterpret_cast(&buffer[KMBRSignatureOffset]))!= KMBRSignature) { __PXYPRINT(_L("MBR not present")); iMsDataMemMap.Reset(); @@ -66,16 +66,16 @@ else { // Move the partition entries to a 4 byte boundary - memcpy(&iIntBuf[0],&iIntBuf[KMBRFirstPartitionOffset],(sizeof(TMBRPartitionEntry)<<2)); + memcpy(&buffer[0],&buffer[KMBRFirstPartitionOffset],(sizeof(TMBRPartitionEntry)<<2)); // Search for a x86 default boot partition - let this be the first - TMBRPartitionEntry* pe = (TMBRPartitionEntry*)(&iIntBuf[0]); + TMBRPartitionEntry* pe = reinterpret_cast(&buffer[0]); TInt firstValidPartitionCount = -1; TInt defaultPartitionNumber = -1; TInt partitionCount = 0; for (TInt i = 0; i < KMBRMaxPrimaryPartitions; i++, pe++) { - if (pe->IsValidDosPartition() || pe->IsValidFAT32Partition()) + if (pe->IsValidDosPartition() || pe->IsValidFAT32Partition() || pe->IsValidExFATPartition()) { __PXYPRINT(_L("Found a Valid Partition")); partitionCount++; @@ -99,7 +99,7 @@ if (partitionCount > 0) { __PXYPRINT1(_L("Using Partition %d"), partitionCount); - pe = (TMBRPartitionEntry*)(&iIntBuf[0]); + pe = reinterpret_cast(&buffer[0]); TInt partitionIndex = firstValidPartitionCount; if (defaultPartitionNumber > 0) { @@ -604,7 +604,7 @@ } else if (KErrGeneral == r) { - RDebug::Print(_L("<<< HOST Caps Unable to communicate with media")); + __HOSTPRINT(_L("<<< HOST Caps Unable to communicate with media")); c.iType = EMediaUnknown; }