[gdal-dev] why padfExtent/s in gdal_alg.h ?

Michael Sumner mdsumner at gmail.com
Wed Feb 8 11:45:17 PST 2023


Thank you, gosh that does help explain a lot.

Cheers, Mike

On Wed, 8 Feb 2023, 21:42 Thomas Knudsen, <knudsen.thomas at gmail.com> wrote:

> >  Ah ok, mostly I was just confused why it's not an error for the compiler
>
> The compiler only needs to know the type of the argument - in a header
> file, the identifier name following
> the type is for human information only
>
>>
>>
> Den ons. 8. feb. 2023 kl. 00.49 skrev Michael Sumner <mdsumner at gmail.com>:
>
>>
>>
>> On Wed, Feb 8, 2023 at 10:44 AM Even Rouault <even.rouault at spatialys.com>
>> wrote:
>>
>>> Michael,
>>>
>>> Feel free to submit a fix as there's obviously no justification for the
>>> discrepancy other than just being accidental.
>>>
>>
>> Ah ok, mostly I was just confused why it's not an error for the compiler
>> ... but I'm getting used to surprises learning C++ :)
>>
>> PR incoming, thanks!
>>
>> Cheers, Mike
>>
>>
>>
>>> There are likely hundreds of similar occurrences in the code base.  I
>>> believe there's a compiler warning (or at least cppcheck) to detect this,
>>> but it is not activated.
>>>
>>> Even
>>> Le 08/02/2023 à 00:35, Michael Sumner a écrit :
>>>
>>> This is not causing any problems afaict, but I happened to notice the
>>> plural for 'padfExtents' in the gdal_alg.h signature for
>>> GDALSuggestedWarpOutput2 compared to gdaltransformer.cpp
>>>
>>>
>>> https://github.com/OSGeo/gdal/blob/579693c2975cda414af75239e09b8b7b952029ca/alg/gdal_alg.h#L264
>>>
>>>
>>> https://github.com/OSGeo/gdal/blob/579693c2975cda414af75239e09b8b7b952029ca/alg/gdaltransformer.cpp#L412
>>>
>>>
>>> The discrepancy is visible in the doc here:
>>>
>>>
>>> https://gdal.org/api/gdal_alg.html#_CPPv424GDALSuggestedWarpOutput212GDALDatasetH19GDALTransformerFuncPvPdPiPiPdi
>>>
>>> Cheers, Mike
>>>
>>>
>>>
>>> --
>>> Michael Sumner
>>> Software and Database Engineer
>>> Australian Antarctic Division
>>> Hobart, Australia
>>> e-mail: mdsumner at gmail.com
>>>
>>> _______________________________________________
>>> gdal-dev mailing listgdal-dev at lists.osgeo.orghttps://lists.osgeo.org/mailman/listinfo/gdal-dev
>>>
>>> -- http://www.spatialys.com
>>> My software is free, but my time generally not.
>>>
>>>
>>
>> --
>> Michael Sumner
>> Software and Database Engineer
>> Australian Antarctic Division
>> Hobart, Australia
>> e-mail: mdsumner at gmail.com
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230209/3c118aaa/attachment.htm>


More information about the gdal-dev mailing list