aboutsummaryrefslogtreecommitdiff
path: root/src/PJ_healpix.c
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2017-02-26 00:22:03 +0100
committerEven Rouault <even.rouault@spatialys.com>2017-02-26 11:25:14 +0100
commit66e04bf4e5cdb27a44e9bea6bacad22c02df2f0d (patch)
treef148438285557a491088b4042a1dfab80f80d577 /src/PJ_healpix.c
parentb288ee6bbc345baf2ef56aaec49184c34a6cd0dd (diff)
downloadPROJ-66e04bf4e5cdb27a44e9bea6bacad22c02df2f0d.tar.gz
PROJ-66e04bf4e5cdb27a44e9bea6bacad22c02df2f0d.zip
Fix warnings related to -Wshadow -Wnull-dereference -Wfloat-conversionr -Wmissing-prototypes -Wmissing-declarations
Diffstat (limited to 'src/PJ_healpix.c')
-rw-r--r--src/PJ_healpix.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/PJ_healpix.c b/src/PJ_healpix.c
index 781fbb7a..fc2122c5 100644
--- a/src/PJ_healpix.c
+++ b/src/PJ_healpix.c
@@ -68,7 +68,7 @@ double rot[7][2][2] = ROT;
* @param v the parameter whose sign is returned.
* @return 1 for positive number, -1 for negative, and 0 for zero.
**/
-double pj_sign (double v) {
+static double pj_sign (double v) {
return v > 0 ? 1 : (v < 0 ? -1 : 0);
}
@@ -152,7 +152,8 @@ static int pnpoly(int nvert, double vert[][2], double testx, double testy) {
* @param north_square the position of the north polar square (rHEALPix only)
* @param south_square the position of the south polar square (rHEALPix only)
**/
-int in_image(double x, double y, int proj, int north_square, int south_square) {
+static int in_image(double x, double y, int proj, int north_square,
+ int south_square) {
if (proj == 0) {
double healpixVertsJit[][2] = {
{-M_PI - EPS, M_FORTPI},
@@ -223,7 +224,7 @@ int in_image(double x, double y, int proj, int north_square, int south_square) {
* return the approximate latitude of authalic latitude alpha (if inverse=1).
* P contains the relevant ellipsoid parameters.
**/
-double auth_lat(PJ *P, double alpha, int inverse) {
+static double auth_lat(PJ *P, double alpha, int inverse) {
struct pj_opaque *Q = P->opaque;
if (inverse == 0) {
/* Authalic latitude. */
@@ -247,7 +248,7 @@ double auth_lat(PJ *P, double alpha, int inverse) {
* Return the HEALPix projection of the longitude-latitude point lp on
* the unit sphere.
**/
-XY healpix_sphere(LP lp) {
+static XY healpix_sphere(LP lp) {
double lam = lp.lam;
double phi = lp.phi;
double phi0 = asin(2.0/3.0);
@@ -275,7 +276,7 @@ XY healpix_sphere(LP lp) {
/**
* Return the inverse of healpix_sphere().
**/
-LP healpix_sphere_inverse(XY xy) {
+static LP healpix_sphere_inverse(XY xy) {
LP lp;
double x = xy.x;
double y = xy.y;