Fix a few warnings about globals

This commit is contained in:
Eric Fischer
2016-03-25 13:03:57 -07:00
parent c2231318bd
commit 52dbed8132
2 changed files with 8 additions and 9 deletions
+8 -8
View File
@@ -28,11 +28,11 @@
#include "version.h" #include "version.h"
#include "memfile.h" #include "memfile.h"
int low_detail = 12; static int low_detail = 12;
int full_detail = -1; static int full_detail = -1;
int min_detail = 7; static int min_detail = 7;
int quiet = 0;
int quiet = 0;
int geometry_scale = 0; int geometry_scale = 0;
#define GEOM_POINT 0 /* array of positions */ #define GEOM_POINT 0 /* array of positions */
@@ -43,11 +43,11 @@ int geometry_scale = 0;
#define GEOM_MULTIPOLYGON 5 /* array of arrays of arrays of arrays of positions */ #define GEOM_MULTIPOLYGON 5 /* array of arrays of arrays of arrays of positions */
#define GEOM_TYPES 6 #define GEOM_TYPES 6
const char *geometry_names[GEOM_TYPES] = { static const char *geometry_names[GEOM_TYPES] = {
"Point", "MultiPoint", "LineString", "MultiLineString", "Polygon", "MultiPolygon", "Point", "MultiPoint", "LineString", "MultiLineString", "Polygon", "MultiPolygon",
}; };
int geometry_within[GEOM_TYPES] = { static int geometry_within[GEOM_TYPES] = {
-1, /* point */ -1, /* point */
GEOM_POINT, /* multipoint */ GEOM_POINT, /* multipoint */
GEOM_POINT, /* linestring */ GEOM_POINT, /* linestring */
@@ -56,7 +56,7 @@ int geometry_within[GEOM_TYPES] = {
GEOM_POLYGON, /* multipolygon */ GEOM_POLYGON, /* multipolygon */
}; };
int mb_geometry[GEOM_TYPES] = { static int mb_geometry[GEOM_TYPES] = {
VT_POINT, VT_POINT, VT_LINE, VT_LINE, VT_POLYGON, VT_POLYGON, VT_POINT, VT_POINT, VT_LINE, VT_LINE, VT_POLYGON, VT_POLYGON,
}; };
@@ -146,7 +146,7 @@ void parse_geometry(int t, json_object *j, long long *bbox, long long *fpos, FIL
int within = geometry_within[t]; int within = geometry_within[t];
if (within >= 0) { if (within >= 0) {
int i; size_t i;
for (i = 0; i < j->length; i++) { for (i = 0; i < j->length; i++) {
if (within == GEOM_POINT) { if (within == GEOM_POINT) {
if (i == 0 || mb_geometry[t] == GEOM_MULTIPOINT) { if (i == 0 || mb_geometry[t] == GEOM_MULTIPOINT) {
-1
View File
@@ -31,7 +31,6 @@ int traverse_zooms(int *geomfd, off_t *geom_size, char *metabase, char *stringpo
int manage_gap(unsigned long long index, unsigned long long *previndex, double scale, double gamma, double *gap); int manage_gap(unsigned long long index, unsigned long long *previndex, double scale, double gamma, double *gap);
extern unsigned initial_x, initial_y;
extern int geometry_scale; extern int geometry_scale;
extern int quiet; extern int quiet;