mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-06 18:35:41 +02:00
Fix warnings identified by g++
This commit is contained in:
@@ -1263,11 +1263,6 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s
|
|||||||
long long count = 0;
|
long long count = 0;
|
||||||
double accum_area = 0;
|
double accum_area = 0;
|
||||||
|
|
||||||
double interval = 0;
|
|
||||||
if (z < basezoom) {
|
|
||||||
interval = std::exp(std::log(droprate) * (basezoom - z));
|
|
||||||
}
|
|
||||||
|
|
||||||
double fraction_accum = 0;
|
double fraction_accum = 0;
|
||||||
|
|
||||||
unsigned long long previndex = 0, density_previndex = 0, merge_previndex = 0;
|
unsigned long long previndex = 0, density_previndex = 0, merge_previndex = 0;
|
||||||
@@ -1285,8 +1280,8 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s
|
|||||||
|
|
||||||
int within[child_shards];
|
int within[child_shards];
|
||||||
long long geompos[child_shards];
|
long long geompos[child_shards];
|
||||||
memset(within, '\0', sizeof(within));
|
memset(within, '\0', child_shards * sizeof(int));
|
||||||
memset(geompos, '\0', sizeof(geompos));
|
memset(geompos, '\0', child_shards * sizeof(long long));
|
||||||
|
|
||||||
if (*geompos_in != og) {
|
if (*geompos_in != og) {
|
||||||
if (fseek(geoms, og, SEEK_SET) != 0) {
|
if (fseek(geoms, og, SEEK_SET) != 0) {
|
||||||
@@ -2096,13 +2091,13 @@ int traverse_zooms(int *geomfd, off_t *geom_size, char *metabase, char *stringpo
|
|||||||
|
|
||||||
// Round down to a power of 2
|
// Round down to a power of 2
|
||||||
for (int e = 0; e < 30; e++) {
|
for (int e = 0; e < 30; e++) {
|
||||||
if (threads >= (1 << e) && threads < (1 << (e + 1))) {
|
if (threads >= (1U << e) && threads < (1U << (e + 1))) {
|
||||||
threads = 1 << e;
|
threads = 1U << e;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (threads >= (1 << 30)) {
|
if (threads >= (1U << 30)) {
|
||||||
threads = 1 << 30;
|
threads = 1U << 30;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Assign temporary files to threads
|
// Assign temporary files to threads
|
||||||
|
|||||||
Reference in New Issue
Block a user