diff --git a/frmts/tiledb/tiledbdense.cpp b/frmts/tiledb/tiledbdense.cpp index 8a2dd5998ce7..cd79022e3b5c 100644 --- a/frmts/tiledb/tiledbdense.cpp +++ b/frmts/tiledb/tiledbdense.cpp @@ -284,7 +284,7 @@ CPLErr TileDBRasterBand::IRasterIO(GDALRWFlag eRWFlag, int nXOff, int nYOff, if (eBufType == eDataType && nXSize == nBufXSize && nYSize == nBufYSize && nBufferDTSize > 0 && nPixelSpace == nBufferDTSize && - nLineSpace == nBufXSize * nBufferDTSize) + nLineSpace == nBufXSize * nPixelSpace) { const uint64_t nBandIdx = poGDS->nBandStart + nBand - 1; std::vector oaSubarray = { @@ -668,7 +668,7 @@ CPLErr TileDBRasterDataset::IRasterIO( if (eIndexMode == ATTRIBUTES && nBandCount == nBands && eBufType == eDataType && nXSize == nBufXSize && nYSize == nBufYSize && nBufferDTSize > 0 && nPixelSpace == nBufferDTSize && - nLineSpace == nBufXSize * nBufferDTSize && + nLineSpace == nBufXSize * nPixelSpace && ((nBandSpace == 0 && nBandCount == 1) || nBandSpace == nBufYSize * nLineSpace)) { diff --git a/port/cpl_vsil.cpp b/port/cpl_vsil.cpp index bcf44013de58..427fa532711d 100644 --- a/port/cpl_vsil.cpp +++ b/port/cpl_vsil.cpp @@ -1464,7 +1464,8 @@ int VSIFilesystemHandler::CopyFile(const char *pszSource, const char *pszTarget, nSourceSize != static_cast(-1) ? double(nOffset) / nSourceSize : 0.0, - pszSource ? osMsg.c_str() : nullptr, pProgressData)) + !osMsg.empty() ? osMsg.c_str() : nullptr, + pProgressData)) { ret = -1; break; diff --git a/port/cpl_vsil_s3.cpp b/port/cpl_vsil_s3.cpp index 5ebea6582998..5c3cbe103400 100644 --- a/port/cpl_vsil_s3.cpp +++ b/port/cpl_vsil_s3.cpp @@ -4117,9 +4117,11 @@ int IVSIS3LikeFSHandler::CopyFileRestartable( else { if (pProgressFunc && - !pProgressFunc(double(iCurChunk) / nChunkCount, - osMsg.c_str(), pProgressData)) + !pProgressFunc(double(iChunk) / nChunkCount, osMsg.c_str(), + pProgressData)) { + // Lock taken only to make static analyzer happy... + std::lock_guard oLock(oMutex); bSuccess = false; break; }