Skip to content

Commit

Permalink
CopyToFinalBufferSameDataType(): silence false positive -Wnull-derefe…
Browse files Browse the repository at this point in the history
…rence
  • Loading branch information
rouault committed Oct 18, 2023
1 parent d26783d commit b1a487f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions gcore/gdalmultidim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4374,7 +4374,14 @@ void CopyToFinalBufferSameDataType(const void *pSrcBuffer, void *pDstBuffer,
std::vector<size_t> anStackCount(nDims);
std::vector<GByte *> pabyDstBufferStack(nDims + 1);
const GByte *pabySrcBuffer = static_cast<const GByte *>(pSrcBuffer);
#if defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wnull-dereference"
#endif
pabyDstBufferStack[0] = static_cast<GByte *>(pDstBuffer);
#if defined(__GNUC__)
#pragma GCC diagnostic pop
#endif
size_t iDim = 0;

lbl_next_depth:
Expand Down

0 comments on commit b1a487f

Please sign in to comment.