Skip to content

Commit

Permalink
Fix false-positive -Wnull-dereference with gcc 14
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed May 10, 2024
1 parent bf88ca9 commit 102def0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions frmts/stacit/stacitdataset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,10 @@ static void ParseAsset(const CPLJSONObject &jAsset,
for (const auto &oItem : oProjTransform)
transform.push_back(oItem.ToDouble());
CPLAssert(transform.size() == 6 || transform.size() == 9);
#if defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wnull-dereference"
#endif
if (transform[0] <= 0 || transform[1] != 0 || transform[3] != 0 ||
transform[4] >= 0 ||
(transform.size() == 9 &&
Expand All @@ -300,6 +304,9 @@ static void ParseAsset(const CPLJSONObject &jAsset,
osAssetName.c_str());
return;
}
#if defined(__GNUC__)
#pragma GCC diagnostic pop
#endif
}

if (bIsBBOXValid && bIsShapeValid)
Expand Down

0 comments on commit 102def0

Please sign in to comment.