[gdal-dev] Warning/Error Update?
Andrew Bell
andrew.bell.ia at gmail.com
Wed May 8 12:47:46 PDT 2024
Hi,
I don't know the history but I'm getting failures from warnings like this:
[ 75%] Building CXX object
frmts/raw/CMakeFiles/gdal_raw.dir/dipxdataset.cpp.obj
1169In file included from ../../alg/viewshed.cpp:36:
1170../../alg/viewshed.h: In constructor 'gdal::Viewshed::Viewshed(const
Options&)':
1171../../alg/viewshed.h:106:22: error: 'gdal::Viewshed::vFirstLineVal'
should be initialized in the member initialization list [-Werror=effc++]
1172 106 | CPL_DLL explicit Viewshed(const Options &opts)
1173 | ^~~~~~~~
This complaint is about a std::vector, whose initialization is
automatically addressed by its default constructor. The same kind of thing
happens with std::string. It's tedious (and IMO error-prone) to have to
initialize things that are already initialized. This was recognized long
ago but perhaps never addressed:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55837
Thoughts on turning off such checks as they're not sufficiently specific?
--
Andrew Bell
andrew.bell.ia at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240508/a9cb29cc/attachment.htm>
More information about the gdal-dev
mailing list