Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix gcc 11 -Wnonnull warnings #2559

Merged
merged 1 commit into from
Mar 6, 2021
Merged

Conversation

rouault
Copy link
Member

@rouault rouault commented Mar 6, 2021

/proj-8.0.0/src/iso19111/operation/coordinateoperationfactory.cpp: In function 'osgeo::proj::operation::TransformationNNPtr osgeo::proj::operation::createBallparkGeographicOffset(const CRSNNPtr&, const CRSNNPtr&, const DatabaseContextPtr&)':
/proj-8.0.0/src/iso19111/operation/coordinateoperationfactory.cpp:1860:36: warning: 'this' pointer is null [-Wnonnull]
 1860 |                 ->coordinateSystem()
      |                                    ^
In file included from /proj-8.0.0/src/iso19111/operation/coordinateoperationfactory.cpp:35:
/proj-8.0.0/include/proj/crs.hpp:196:47: note: in a call to non-static member function 'const CoordinateSystemNNPtr& osgeo::proj::crs::SingleCRS::coordinateSystem() const'
  196 |     PROJ_DLL const cs::CoordinateSystemNNPtr &coordinateSystem() PROJ_PURE_DECL;
      |                                               ^~~~~~~~~~~~~~~~
/proj-8.0.0/src/iso19111/operation/coordinateoperationfactory.cpp:1864:36: warning: 'this' pointer is null [-Wnonnull]
 1864 |                 ->coordinateSystem()
      |                                    ^
In file included from /proj-8.0.0/src/iso19111/operation/coordinateoperationfactory.cpp:35:
/proj-8.0.0/include/proj/crs.hpp:196:47: note: in a call to non-static member function 'const CoordinateSystemNNPtr& osgeo::proj::crs::SingleCRS::coordinateSystem() const'
  196 |     PROJ_DLL const cs::CoordinateSystemNNPtr &coordinateSystem() PROJ_PURE_DECL;
      |                                               ^~~~~~~~~~~~~~~~
/proj-8.0.0/src/iso19111/factory.cpp: In member function 'std::vector<dropbox::oxygen::nn<std::shared_ptr<osgeo::proj::operation::CoordinateOperation> > > osgeo::proj::io::AuthorityFactory::createBetweenGeodeticCRSWithDatumBasedIntermediates(const CRSNNPtr&, const string&, const string&, const CRSNNPtr&, const string&, const string&, bool, bool, bool, bool, const std::vector<std::__cxx11::basic_string<char> >&, const ExtentPtr&, const ExtentPtr&) const':
/proj-8.0.0/src/iso19111/factory.cpp:4724:66: warning: 'this' pointer is null [-Wnonnull]
 4724 |         dynamic_cast<crs::GeodeticCRS *>(sourceCRS.get())->datum();
      |                                                                  ^
In file included from /proj-8.0.0/src/iso19111/factory.cpp:36:
/proj-8.0.0/include/proj/crs.hpp:254:54: note: in a call to non-static member function 'const GeodeticReferenceFramePtr& osgeo::proj::crs::GeodeticCRS::datum() const'
  254 |     PROJ_DLL const datum::GeodeticReferenceFramePtr &datum() PROJ_PURE_DECL;
      |                                                      ^~~~~
/proj-8.0.0/src/iso19111/factory.cpp:4726:66: warning: 'this' pointer is null [-Wnonnull]
 4726 |         dynamic_cast<crs::GeodeticCRS *>(targetCRS.get())->datum();
      |                                                                  ^
In file included from /proj-8.0.0/src/iso19111/factory.cpp:36:
/proj-8.0.0/include/proj/crs.hpp:254:54: note: in a call to non-static member function 'const GeodeticReferenceFramePtr& osgeo::proj::crs::GeodeticCRS::datum() const'
  254 |     PROJ_DLL const datum::GeodeticReferenceFramePtr &datum() PROJ_PURE_DECL;
      |                                                      ^~~~~

```
/proj-8.0.0/src/iso19111/operation/coordinateoperationfactory.cpp: In function 'osgeo::proj::operation::TransformationNNPtr osgeo::proj::operation::createBallparkGeographicOffset(const CRSNNPtr&, const CRSNNPtr&, const DatabaseContextPtr&)':
/proj-8.0.0/src/iso19111/operation/coordinateoperationfactory.cpp:1860:36: warning: 'this' pointer is null [-Wnonnull]
 1860 |                 ->coordinateSystem()
      |                                    ^
In file included from /proj-8.0.0/src/iso19111/operation/coordinateoperationfactory.cpp:35:
/proj-8.0.0/include/proj/crs.hpp:196:47: note: in a call to non-static member function 'const CoordinateSystemNNPtr& osgeo::proj::crs::SingleCRS::coordinateSystem() const'
  196 |     PROJ_DLL const cs::CoordinateSystemNNPtr &coordinateSystem() PROJ_PURE_DECL;
      |                                               ^~~~~~~~~~~~~~~~
/proj-8.0.0/src/iso19111/operation/coordinateoperationfactory.cpp:1864:36: warning: 'this' pointer is null [-Wnonnull]
 1864 |                 ->coordinateSystem()
      |                                    ^
In file included from /proj-8.0.0/src/iso19111/operation/coordinateoperationfactory.cpp:35:
/proj-8.0.0/include/proj/crs.hpp:196:47: note: in a call to non-static member function 'const CoordinateSystemNNPtr& osgeo::proj::crs::SingleCRS::coordinateSystem() const'
  196 |     PROJ_DLL const cs::CoordinateSystemNNPtr &coordinateSystem() PROJ_PURE_DECL;
      |                                               ^~~~~~~~~~~~~~~~
/proj-8.0.0/src/iso19111/factory.cpp: In member function 'std::vector<dropbox::oxygen::nn<std::shared_ptr<osgeo::proj::operation::CoordinateOperation> > > osgeo::proj::io::AuthorityFactory::createBetweenGeodeticCRSWithDatumBasedIntermediates(const CRSNNPtr&, const string&, const string&, const CRSNNPtr&, const string&, const string&, bool, bool, bool, bool, const std::vector<std::__cxx11::basic_string<char> >&, const ExtentPtr&, const ExtentPtr&) const':
/proj-8.0.0/src/iso19111/factory.cpp:4724:66: warning: 'this' pointer is null [-Wnonnull]
 4724 |         dynamic_cast<crs::GeodeticCRS *>(sourceCRS.get())->datum();
      |                                                                  ^
In file included from /proj-8.0.0/src/iso19111/factory.cpp:36:
/proj-8.0.0/include/proj/crs.hpp:254:54: note: in a call to non-static member function 'const GeodeticReferenceFramePtr& osgeo::proj::crs::GeodeticCRS::datum() const'
  254 |     PROJ_DLL const datum::GeodeticReferenceFramePtr &datum() PROJ_PURE_DECL;
      |                                                      ^~~~~
/proj-8.0.0/src/iso19111/factory.cpp:4726:66: warning: 'this' pointer is null [-Wnonnull]
 4726 |         dynamic_cast<crs::GeodeticCRS *>(targetCRS.get())->datum();
      |                                                                  ^
In file included from /proj-8.0.0/src/iso19111/factory.cpp:36:
/proj-8.0.0/include/proj/crs.hpp:254:54: note: in a call to non-static member function 'const GeodeticReferenceFramePtr& osgeo::proj::crs::GeodeticCRS::datum() const'
  254 |     PROJ_DLL const datum::GeodeticReferenceFramePtr &datum() PROJ_PURE_DECL;
      |                                                      ^~~~~
```
@rouault rouault added this to the 8.0.1 milestone Mar 6, 2021
@rouault rouault merged commit 3af34fc into OSGeo:master Mar 6, 2021
@rouault
Copy link
Member Author

rouault commented Mar 6, 2021

Manually cherry-picked to 8.0 branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant