mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-05 18:05:42 +02:00
Fix warnings
This commit is contained in:
@@ -341,7 +341,7 @@ drawvec clean_or_clip_poly(drawvec &geom, int z, int buffer, bool clip, bool try
|
|||||||
if (k != i) {
|
if (k != i) {
|
||||||
fprintf(f, ",");
|
fprintf(f, ",");
|
||||||
}
|
}
|
||||||
fprintf(f, "[%lld,%lld]", geom[k].x, geom[k].y);
|
fprintf(f, "[%lld,%lld]", (long long) geom[k].x, (long long) geom[k].y);
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(f, "]");
|
fprintf(f, "]");
|
||||||
@@ -1008,7 +1008,7 @@ drawvec reduce_tiny_poly(drawvec const &geom, int z, int detail, bool *still_nee
|
|||||||
fprintf(stderr, "how did we get here with %d in %d?\n", geom[i].op, (int) geom.size());
|
fprintf(stderr, "how did we get here with %d in %d?\n", geom[i].op, (int) geom.size());
|
||||||
|
|
||||||
for (size_t n = 0; n < geom.size(); n++) {
|
for (size_t n = 0; n < geom.size(); n++) {
|
||||||
fprintf(stderr, "%d/%lld/%lld ", geom[n].op, geom[n].x, geom[n].y);
|
fprintf(stderr, "%d/%lld/%lld ", geom[n].op, (long long) geom[n].x, (long long) geom[n].y);
|
||||||
}
|
}
|
||||||
fprintf(stderr, "\n");
|
fprintf(stderr, "\n");
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -159,7 +159,7 @@ void check_polygon(drawvec &geom) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!on_edge) {
|
if (!on_edge) {
|
||||||
fprintf(stderr, "%lld,%lld at %lld not in outer ring (%lld to %lld)\n", geom[k].x, geom[k].y, (long long) k, (long long) outer_start, (long long) (outer_start + outer_len));
|
fprintf(stderr, "%lld,%lld at %lld not in outer ring (%lld to %lld)\n", (long long) geom[k].x, (long long) geom[k].y, (long long) k, (long long) outer_start, (long long) (outer_start + outer_len));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2232,7 +2232,10 @@ std::pair<int, metadata> read_input(std::vector<source> &sources, char *fname, i
|
|||||||
|
|
||||||
estimated_complexity = geompos;
|
estimated_complexity = geompos;
|
||||||
fflush(geomfile);
|
fflush(geomfile);
|
||||||
pwrite(fileno(geomfile), &estimated_complexity, sizeof(estimated_complexity), 0);
|
if (pwrite(fileno(geomfile), &estimated_complexity, sizeof(estimated_complexity), 0) != 0) {
|
||||||
|
perror("pwrite estimated complexity");
|
||||||
|
exit(EXIT_WRITE);
|
||||||
|
}
|
||||||
|
|
||||||
if (fclose(geomfile) != 0) {
|
if (fclose(geomfile) != 0) {
|
||||||
perror("fclose geom");
|
perror("fclose geom");
|
||||||
|
|||||||
+2
-2
@@ -131,12 +131,12 @@ void deserialize_ulong_long(const char **f, unsigned long long *zigzag) {
|
|||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
if ((**f & 0x80) == 0) {
|
if ((**f & 0x80) == 0) {
|
||||||
*zigzag |= ((const unsigned long long) **f) << shift;
|
*zigzag |= ((unsigned long long) **f) << shift;
|
||||||
*f += 1;
|
*f += 1;
|
||||||
shift += 7;
|
shift += 7;
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
*zigzag |= ((const unsigned long long) (**f & 0x7F)) << shift;
|
*zigzag |= ((unsigned long long) (**f & 0x7F)) << shift;
|
||||||
*f += 1;
|
*f += 1;
|
||||||
shift += 7;
|
shift += 7;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -196,7 +196,7 @@ bool find_common_edges(std::vector<serial_feature> &features, int z, int line_de
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (e1.first == e1.second || e2.first == e2.second) {
|
if (e1.first == e1.second || e2.first == e2.second) {
|
||||||
fprintf(stderr, "Internal error: polygon edge lookup failed for %lld,%lld to %lld,%lld or %lld,%lld to %lld,%lld\n", left[0].x, left[0].y, left[1].x, left[1].y, right[0].x, right[0].y, right[1].x, right[1].y);
|
fprintf(stderr, "Internal error: polygon edge lookup failed for %lld,%lld to %lld,%lld or %lld,%lld to %lld,%lld\n", (long long) left[0].x, (long long) left[0].y, (long long) left[1].x, (long long) left[1].y, (long long) right[0].x, (long long) right[0].y, (long long) right[1].x, (long long) right[1].y);
|
||||||
exit(EXIT_IMPOSSIBLE);
|
exit(EXIT_IMPOSSIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2094,7 +2094,10 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
|||||||
|
|
||||||
if (additional[A_TRUNCATE_ZOOMS]) {
|
if (additional[A_TRUNCATE_ZOOMS]) {
|
||||||
fflush(geomfile[j]->fp);
|
fflush(geomfile[j]->fp);
|
||||||
pwrite(fileno(geomfile[j]->fp), &estimated_complexity_out, sizeof(estimated_complexity_out), start_geompos[j]);
|
if (pwrite(fileno(geomfile[j]->fp), &estimated_complexity_out, sizeof(estimated_complexity_out), start_geompos[j]) != 0) {
|
||||||
|
perror("pwrite complexity");
|
||||||
|
exit(EXIT_WRITE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user