diff --git a/diskimg/CPM.cpp b/diskimg/CPM.cpp index 6108396..ea68b85 100644 --- a/diskimg/CPM.cpp +++ b/diskimg/CPM.cpp @@ -571,8 +571,8 @@ void A2FileCPM::Dump(void) const */ DIError A2FDCPM::Read(void* buf, size_t len, size_t* pActual) { - LOGI(" CP/M reading %zd bytes from '%s' (offset=%ld)", - len, fpFile->GetPathName(), (long) fOffset); + LOGI(" CP/M reading %lu bytes from '%s' (offset=%ld)", + (unsigned long) len, fpFile->GetPathName(), (long) fOffset); A2FileCPM* pFile = (A2FileCPM*) fpFile; diff --git a/diskimg/DDD.cpp b/diskimg/DDD.cpp index 1062368..b0c7cb7 100644 --- a/diskimg/DDD.cpp +++ b/diskimg/DDD.cpp @@ -514,12 +514,13 @@ static const uint8_t kFavoriteBitDec[kNumFavorites] = { dierr = pGFD->Read(&sctBuf, sizeof(sctBuf), &actual); if (dierr == kDIErrNone) { if (actual > /*kMaxExcessByteCount*/ 256) { - LOGI(" DDD looks like too much data in input file (%zd extra)", - actual); + LOGW(" DDD looks like too much data in input file (%lu extra)", + (unsigned long) actual); dierr = kDIErrBadCompressedData; goto bail; } else { - LOGI(" DDD excess bytes (%zd) within normal parameters", actual); + LOGI(" DDD excess bytes (%lu) within normal parameters", + (unsigned long) actual); } } diff --git a/diskimg/DOS33.cpp b/diskimg/DOS33.cpp index 3788223..0b0fa8d 100644 --- a/diskimg/DOS33.cpp +++ b/diskimg/DOS33.cpp @@ -2884,8 +2884,8 @@ bail: */ DIError A2FDDOS::Read(void* buf, size_t len, size_t* pActual) { - LOGI(" DOS reading %zd bytes from '%s' (offset=%ld)", - len, fpFile->GetPathName(), (long) fOffset); + LOGD(" DOS reading %lu bytes from '%s' (offset=%ld)", + (unsigned long) len, fpFile->GetPathName(), (long) fOffset); A2FileDOS* pFile = (A2FileDOS*) fpFile; @@ -2976,7 +2976,7 @@ DIError A2FDDOS::Write(const void* buf, size_t len, size_t* pActual) DiskFSDOS33* pDiskFS = (DiskFSDOS33*) fpFile->GetDiskFS(); uint8_t sctBuf[kSctSize]; - LOGI(" DOS Write len=%zd %s", len, pFile->GetPathName()); + LOGD(" DOS Write len=%lu %s", (unsigned long) len, pFile->GetPathName()); if (len >= 0x01000000) { // 16MB assert(false); diff --git a/diskimg/FAT.cpp b/diskimg/FAT.cpp index ff94404..7b7e27c 100644 --- a/diskimg/FAT.cpp +++ b/diskimg/FAT.cpp @@ -394,8 +394,8 @@ DIError A2FileFAT::Open(A2FileDescr** ppOpenFile, bool readOnly, */ DIError A2FDFAT::Read(void* buf, size_t len, size_t* pActual) { - LOGD(" FAT reading %zd bytes from '%s' (offset=%ld)", - len, fpFile->GetPathName(), (long) fOffset); + LOGD(" FAT reading %lu bytes from '%s' (offset=%ld)", + (unsigned long) len, fpFile->GetPathName(), (long) fOffset); A2FileFAT* pFile = (A2FileFAT*) fpFile; diff --git a/diskimg/GenericFD.cpp b/diskimg/GenericFD.cpp index a28ac2d..b751cfb 100644 --- a/diskimg/GenericFD.cpp +++ b/diskimg/GenericFD.cpp @@ -142,8 +142,8 @@ DIError GFDFile::Read(void* buf, size_t length, size_t* pActual) if (pActual == NULL) { if (actual != length) { dierr = ErrnoOrGeneric(); - LOGI(" GDFile Read failed on %zd bytes (actual=%zd, err=%d)", - length, actual, dierr); + LOGW(" GDFile Read failed on %lu bytes (actual=%lu, err=%d)", + (unsigned long) length, (unsigned long) actual, dierr); return dierr; } } else { @@ -163,7 +163,8 @@ DIError GFDFile::Write(const void* buf, size_t length, size_t* pActual) assert(pActual == NULL); // not handling this yet if (::fwrite(buf, length, 1, fFp) != 1) { dierr = ErrnoOrGeneric(); - LOGI(" GDFile Write failed on %zd bytes (err=%d)", length, dierr); + LOGW(" GDFile Write failed on %lu bytes (err=%d)", + (unsigned long) length, dierr); return dierr; } return dierr; @@ -440,8 +441,8 @@ DIError GFDBuffer::Read(void* buf, size_t length, size_t* pActual) if (fCurrentOffset + (long)length > fLength) { if (pActual == NULL) { - LOGI(" GFDBuffer underrrun off=%ld len=%zd flen=%ld", - (long) fCurrentOffset, length, (long) fLength); + LOGW(" GFDBuffer underrrun off=%ld len=%lu flen=%ld", + (long) fCurrentOffset, (unsigned long) length, (long) fLength); return kDIErrDataUnderrun; } else { /* set *pActual and adjust "length" */ @@ -469,8 +470,8 @@ DIError GFDBuffer::Write(const void* buf, size_t length, size_t* pActual) assert(pActual == NULL); // not handling this yet if (fCurrentOffset + (long)length > fLength) { if (!fDoExpand) { - LOGI(" GFDBuffer overrun off=%ld len=%zd flen=%ld", - (long) fCurrentOffset, length, (long) fLength); + LOGI(" GFDBuffer overrun off=%ld len=%lu flen=%ld", + (long) fCurrentOffset, (unsigned long) length, (long) fLength); return kDIErrDataOverrun; } diff --git a/diskimg/Gutenberg.cpp b/diskimg/Gutenberg.cpp index 6e26c3f..dfccdb5 100644 --- a/diskimg/Gutenberg.cpp +++ b/diskimg/Gutenberg.cpp @@ -523,8 +523,8 @@ void A2FileGutenberg::Dump(void) const */ DIError A2FDGutenberg::Read(void* buf, size_t len, size_t* pActual) { - LOGI(" Gutenberg reading %zd bytes from '%s' (offset=%ld)", - len, fpFile->GetPathName(), (long) fOffset); + LOGD(" Gutenberg reading %lu bytes from '%s' (offset=%ld)", + (unsigned long) len, fpFile->GetPathName(), (long) fOffset); A2FileGutenberg* pFile = (A2FileGutenberg*) fpFile; diff --git a/diskimg/HFS.cpp b/diskimg/HFS.cpp index 00b3341..664ed6e 100644 --- a/diskimg/HFS.cpp +++ b/diskimg/HFS.cpp @@ -1855,8 +1855,9 @@ DIError A2FDHFS::Read(void* buf, size_t len, size_t* pActual) { long result; - LOGI(" HFS reading %zd bytes from '%s' (offset=%ld)", - len, fpFile->GetPathName(), hfs_seek(fHfsFile, 0, HFS_SEEK_CUR)); + LOGD(" HFS reading %lu bytes from '%s' (offset=%ld)", + (unsigned long) len, fpFile->GetPathName(), + hfs_seek(fHfsFile, 0, HFS_SEEK_CUR)); //A2FileHFS* pFile = (A2FileHFS*) fpFile; @@ -1896,8 +1897,9 @@ DIError A2FDHFS::Write(const void* buf, size_t len, size_t* pActual) { long result; - LOGI(" HFS writing %zd bytes to '%s' (offset=%ld)", - len, fpFile->GetPathName(), hfs_seek(fHfsFile, 0, HFS_SEEK_CUR)); + LOGD(" HFS writing %lu bytes to '%s' (offset=%ld)", + (unsigned long) len, fpFile->GetPathName(), + hfs_seek(fHfsFile, 0, HFS_SEEK_CUR)); fModified = true; // assume something gets changed diff --git a/diskimg/OuterWrapper.cpp b/diskimg/OuterWrapper.cpp index 65bfa51..ce6f3e5 100644 --- a/diskimg/OuterWrapper.cpp +++ b/diskimg/OuterWrapper.cpp @@ -328,7 +328,7 @@ DIError OuterGzip::Save(GenericFD* pOuterGFD, GenericFD* pWrapperGFD, written = gzwrite(gzfp, buf, actual); if (written == 0) { - LOGI("Failed writing %zd bytes to gzio", actual); + LOGE("Failed writing %lu bytes to gzio", (unsigned long) actual); dierr = kDIErrGeneric; goto bail; } @@ -338,7 +338,7 @@ DIError OuterGzip::Save(GenericFD* pOuterGFD, GenericFD* pWrapperGFD, } assert(wrapperLength == 0); // not expecting any slop - LOGI(" GZ wrote %ld bytes", totalWritten); + LOGD(" GZ wrote %ld bytes", totalWritten); /* * Success! diff --git a/diskimg/Pascal.cpp b/diskimg/Pascal.cpp index 0e6a47e..6eff01a 100644 --- a/diskimg/Pascal.cpp +++ b/diskimg/Pascal.cpp @@ -1579,8 +1579,8 @@ DIError A2FilePascal::Open(A2FileDescr** ppOpenFile, bool readOnly, */ DIError A2FDPascal::Read(void* buf, size_t len, size_t* pActual) { - LOGI(" Pascal reading %zd bytes from '%s' (offset=%ld)", - len, fpFile->GetPathName(), (long) fOffset); + LOGD(" Pascal reading %lu bytes from '%s' (offset=%ld)", + (unsigned long) len, fpFile->GetPathName(), (long) fOffset); A2FilePascal* pFile = (A2FilePascal*) fpFile; @@ -1644,7 +1644,7 @@ DIError A2FDPascal::Write(const void* buf, size_t len, size_t* pActual) uint8_t blkBuf[kBlkSize]; size_t origLen = len; - LOGI(" DOS Write len=%zd %s", len, pFile->GetPathName()); + LOGD(" DOS Write len=%lu %s", (unsigned long) len, pFile->GetPathName()); if (len >= 0x01000000) { // 16MB assert(false); @@ -1669,8 +1669,8 @@ DIError A2FDPascal::Write(const void* buf, size_t len, size_t* pActual) blocksAvail = pNextFile->fStartBlock - pFile->fStartBlock; blocksNeeded = (len + kBlkSize -1) / kBlkSize; - LOGI("Pascal write '%s' %zd bytes: avail=%ld needed=%ld", - pFile->GetPathName(), len, blocksAvail, blocksNeeded); + LOGD("Pascal write '%s' %lu bytes: avail=%ld needed=%ld", + pFile->GetPathName(), (unsigned long) len, blocksAvail, blocksNeeded); if (blocksAvail < blocksNeeded) return kDIErrDiskFull; diff --git a/diskimg/ProDOS.cpp b/diskimg/ProDOS.cpp index 8579af4..34cc352 100644 --- a/diskimg/ProDOS.cpp +++ b/diskimg/ProDOS.cpp @@ -3652,8 +3652,8 @@ DIError DiskFSProDOS::SetFileInfo(A2File* pGenericFile, long fileType, goto bail; } if ((size_t) (*ptr & 0x0f) != strlen(pFile->fDirEntry.fileName)) { - LOGI("ProDOS GLITCH: wrong file? (len=%d vs %zd)", - *ptr & 0x0f, strlen(pFile->fDirEntry.fileName)); + LOGW("ProDOS GLITCH: wrong file? (len=%d vs %u)", + *ptr & 0x0f, (unsigned int) strlen(pFile->fDirEntry.fileName)); assert(false); dierr = kDIErrBadDirectory; goto bail; @@ -4392,8 +4392,8 @@ void A2FileProDOS::Dump(void) const */ DIError A2FDProDOS::Read(void* buf, size_t len, size_t* pActual) { - LOGI(" ProDOS reading %zd bytes from '%s' (offset=%ld)", - len, fpFile->GetPathName(), (long) fOffset); + LOGD(" ProDOS reading %lu bytes from '%s' (offset=%ld)", + (unsigned long) len, fpFile->GetPathName(), (long) fOffset); //if (fBlockList == NULL) // return kDIErrNotReady; @@ -4772,8 +4772,8 @@ DIError A2FDProDOS::WriteDirectory(const void* buf, size_t len, size_t* pActual) { DIError dierr = kDIErrNone; - LOGI("ProDOS writing %zd bytes to directory '%s'", - len, fpFile->GetPathName()); + LOGD("ProDOS writing %lu bytes to directory '%s'", + (unsigned long) len, fpFile->GetPathName()); assert(len >= (size_t)kBlkSize); assert((len % kBlkSize) == 0); diff --git a/diskimg/RDOS.cpp b/diskimg/RDOS.cpp index 956f266..c28a4af 100644 --- a/diskimg/RDOS.cpp +++ b/diskimg/RDOS.cpp @@ -533,8 +533,8 @@ DIError A2FileRDOS::Open(A2FileDescr** ppOpenFile, bool readOnly, */ DIError A2FDRDOS::Read(void* buf, size_t len, size_t* pActual) { - LOGI(" RDOS reading %zd bytes from '%s' (offset=%ld)", - len, fpFile->GetPathName(), (long) fOffset); + LOGD(" RDOS reading %lu bytes from '%s' (offset=%ld)", + (unsigned long) len, fpFile->GetPathName(), (long) fOffset); //if (!fOpen) // return kDIErrNotReady;