Skip to content

Commit

Permalink
Merge pull request #3955 from rouault/coverity_GLOBAL_INIT_ORDER
Browse files Browse the repository at this point in the history
Move static NameSpace::GLOBAL definition in static.cpp to avoid 'static initialization fiasco' (fixes various Coverity warnings)
  • Loading branch information
rouault authored Nov 19, 2023
2 parents b124309 + d1314c0 commit 72f9084
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/iso19111/static.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ NS_PROJ_START

// ---------------------------------------------------------------------------

const NameSpaceNNPtr NameSpace::GLOBAL(NameSpace::createGLOBAL());

// ---------------------------------------------------------------------------

/** \brief Key to set the authority citation of a metadata::Identifier.
*
* The value is to be provided as a string or a metadata::Citation.
Expand Down
4 changes: 0 additions & 4 deletions src/iso19111/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -494,10 +494,6 @@ NameSpaceNNPtr NameSpace::createGLOBAL() {

// ---------------------------------------------------------------------------

const NameSpaceNNPtr NameSpace::GLOBAL(NameSpace::createGLOBAL());

// ---------------------------------------------------------------------------

//! @cond Doxygen_Suppress
struct LocalName::Private {
NameSpacePtr scope{};
Expand Down

0 comments on commit 72f9084

Please sign in to comment.