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

Use GetGDALDriverManager to register driver #25

Merged
merged 1 commit into from
Jul 26, 2023

Conversation

nilason
Copy link
Collaborator

@nilason nilason commented Jul 20, 2023

'GetRegistrar' and 'RegisterDriver' are deprecated.

Compilation issues the following warnings:

clang++-mp-devel -dynamiclib  grass.o -L/opt/local/lib/grass83/lib -lgrass_vector -lgrass_dig2 -lgrass_dgl -lgrass_rtree -lgrass_linkm -lgrass_dbmiclient -lgrass_dbmibase -lgrass_raster -lgrass_imagery -lgrass_gproj -lgrass_gmath -lgrass_gis -lgrass_datetime -lgrass_btree2 -lgrass_ccmath -L/opt/local/lib -lgdal  -o gdal_GRASS.so -Wl,-rpath,"/opt/local/lib/grass83/lib"
clang++-mp-devel -std=c++11 -Wall  -DUSE_CPL -DGRASS_GISBASE=\"/opt/local/lib/grass83\" -I/opt/local/include -I/opt/local/lib/grass83/include -I/opt/local/include/postgresql15 -I/opt/local/lib/proj9/include -g -O2 -c -o ogrgrassdriver.o ogrgrassdriver.cpp
ogrgrassdriver.cpp:99:27: warning: 'GetRegistrar' is deprecated: Use GDALDriverManager class instead [-Wdeprecated-declarations]
    OGRSFDriverRegistrar::GetRegistrar()->RegisterDriver( poDriver );
                          ^
/opt/local/include/ogrsf_frmts.h:546:9: note: 'GetRegistrar' has been explicitly marked deprecated here
        OGR_DEPRECATED("Use GDALDriverManager class instead");
        ^
/opt/local/include/ogrsf_frmts.h:49:27: note: expanded from macro 'OGR_DEPRECATED'
#define OGR_DEPRECATED(x) CPL_WARN_DEPRECATED(x)
                          ^
/opt/local/include/cpl_port.h:1052:47: note: expanded from macro 'CPL_WARN_DEPRECATED'
#define CPL_WARN_DEPRECATED(x) __attribute__((deprecated(x)))
                                              ^
ogrgrassdriver.cpp:99:43: warning: 'RegisterDriver' is deprecated: Use GDALDriverManager class instead [-Wdeprecated-declarations]
    OGRSFDriverRegistrar::GetRegistrar()->RegisterDriver( poDriver );
                                          ^
/opt/local/include/ogrsf_frmts.h:550:9: note: 'RegisterDriver' has been explicitly marked deprecated here
        OGR_DEPRECATED("Use GDALDriverManager class instead");
        ^
/opt/local/include/ogrsf_frmts.h:49:27: note: expanded from macro 'OGR_DEPRECATED'
#define OGR_DEPRECATED(x) CPL_WARN_DEPRECATED(x)
                          ^
/opt/local/include/cpl_port.h:1052:47: note: expanded from macro 'CPL_WARN_DEPRECATED'
#define CPL_WARN_DEPRECATED(x) __attribute__((deprecated(x)))
                                              ^
2 warnings generated.

'GetRegistrar' and 'RegisterDriver' are deprecated.
@nilason nilason added this to the 1.0.3 milestone Jul 20, 2023
@nilason nilason added the bug Something isn't working label Jul 20, 2023
@nilason
Copy link
Collaborator Author

nilason commented Jul 24, 2023

I’ll merge this soon if if there are no objections.

@nilason nilason merged commit 1f6a624 into OSGeo:main Jul 26, 2023
@nilason nilason deleted the driver_reg branch July 26, 2023 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant