aboutsummaryrefslogtreecommitdiff
path: root/src/nad2bin.c
AgeCommit message (Collapse)Author
2018-05-30Fix warnings found by clang with new warning flags to be added in later commitEven Rouault
Fixes consist in: - no use of comma operator for multi statement purpose - avoid confusing comma in for loops first and third clauses - avoid implicit long to int casts by storing to long, or explicit bound checking before cast
2018-03-14Avoid 'Found calculation inside sizeof()' false positive with older cppcheck ↵Even Rouault
versions
2018-03-14Avoid 'invalidscanf,scanf without field width limits can crash with huge ↵Even Rouault
input data on some versions of libc' with older cppcheck versions
2018-03-12Fix 'src/nad2bin.c:80,style,arrayIndexThenCheck,Array index 'i' is used ↵Even Rouault
before limits check' false positive cppcheck warning
2017-12-17Declare non-local variables as const where possibleAaron Puchert
Having non-const variables of static lifetime or even global scope is usually a bad idea. These variables are inherently constants, and this should be enforced. This required marking some functions as not modifying input parameters and marking some pointers as pointers to const. One advantage is that the compiler usually puts const static variables in a read-only code segment, so they can't be modified physically. This can be verified with `nm` (on POSIX systems). To avoid changes to the public API, functions returning non-const pointers to data tables were left intact, but the returned data may not be modified. Internally we prefer using the proj_list_* functions over the pj_get_*_ref functions, because the former return const pointers.
2017-11-27Replace some asserts by compile-time assertionsAaron Puchert
Decisions regarding the size of certain types are always made at compile time, hence this is where the assertion should take place. If the assertions fail, there is now a compiler error.
2017-02-26Raise MSVC warning level to /W4Even Rouault
2017-02-26Fix warnings related to -Wshadow -Wnull-dereference -Wfloat-conversionr ↵Even Rouault
-Wmissing-prototypes -Wmissing-declarations
2016-05-28Change math constants, similar to PR #372. Use M_ namespace with the de ↵Micah Cochran
facto standard M_PI and its ilk. Change names that are widely used in the project to be in the M_ namespace, so HALFPI becomes M_HALFPI. HALFPI is #defined as M_PI_2 (the defacto standard name). #defines _USE_MATH_DEFINES for MS Visual Studio (I didn't personally test this part, but Appveyor will not build otherwise).
2016-05-23Make nad2bin output reproducible.Bas Couwenberg
Init CTABLE.id char[80] variable with zeroes, so that nad2bin output does not depend on memory state before call, and hence be reproducible.
2015-05-30Fix signed/unsigned comparison warnings.Elliott Sales de Andrade
2012-06-28fix byte swapping of ctable2 files on bigendian platforms (#157)Frank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@2225 4e78687f-474d-0410-85f9-8d5e500ac6b2
2012-02-21improve error checking (#140)Frank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@2162 4e78687f-474d-0410-85f9-8d5e500ac6b2
2012-01-31fix strcmp for -f flag in nad2bin (#139)Frank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@2151 4e78687f-474d-0410-85f9-8d5e500ac6b2
2011-11-22implement support for ctable2 format (read/write)Frank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@2121 4e78687f-474d-0410-85f9-8d5e500ac6b2
2011-11-19preliminary addition of ctable output support too, untestedFrank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@2120 4e78687f-474d-0410-85f9-8d5e500ac6b2
2011-11-14nad2bin products NTv2, nad2nad removedFrank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@2118 4e78687f-474d-0410-85f9-8d5e500ac6b2
2009-04-02avoid various warningsFrank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1558 4e78687f-474d-0410-85f9-8d5e500ac6b2
2009-01-26remove SCCSID and lint stuff from all source filesFrank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1515 4e78687f-474d-0410-85f9-8d5e500ac6b2
1999-03-18NewFrank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@776 4e78687f-474d-0410-85f9-8d5e500ac6b2