Index: src/libchcore/TLocalFilesystem.cpp =================================================================== diff -u -N -re4005a958c9412d890eeff1e8087c8298aa7bcf7 -rcdc76e1a95383dff63a5254aeb8d37035028512c --- src/libchcore/TLocalFilesystem.cpp (.../TLocalFilesystem.cpp) (revision e4005a958c9412d890eeff1e8087c8298aa7bcf7) +++ src/libchcore/TLocalFilesystem.cpp (.../TLocalFilesystem.cpp) (revision cdc76e1a95383dff63a5254aeb8d37035028512c) @@ -26,7 +26,6 @@ #include #include "TAutoHandles.h" #include "TFileInfo.h" -#include "DataBuffer.h" // disable "warning C4201: nonstandard extension used : nameless struct/union" // for standard VS2008 with SDK 6.0A where winioctl.h generates some warnings // converted to errors by the project settings. @@ -41,9 +40,13 @@ #include "TOverlappedDataBuffer.h" #include "RoundingFunctions.h" #include +#include "TBufferSizes.h" BEGIN_CHCORE_NAMESPACE +// compile-time check - ensure the buffer granularity used for transfers are bigger than expected sector size +static_assert(TLocalFilesystemFile::MaxSectorSize <= TBufferSizes::BufferGranularity, "Buffer granularity must be equal to or bigger than the max sector size"); + UINT TLocalFilesystem::GetDriveData(const TSmartPath& spPath) { UINT uiDrvType = DRIVE_UNKNOWN;