Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
9f0d99e
avrdude/avr.c:86:5: fix warning: this ‘while’ clause does not guard
themanyone Sep 18, 2025
b63faec
/buspirate.c:572:40: fix warning: dangling pointer ‘submode’ to an un…
themanyone Sep 18, 2025
1d423f9
clipper.cpp: fix warn: use assignment instead of clearing.
themanyone Sep 18, 2025
b1001c0
clipper.cpp:789:30: fix warning: comparison of integer expressions of…
themanyone Sep 18, 2025
664617e
ViewerImpl.cpp: Fix signed/unsigned comparison warnings by changing l…
themanyone Sep 18, 2025
9b33e81
normals.cpp:191:30: fix warning: comparison of integer expressions of…
themanyone Sep 18, 2025
46bed2e
normals.cpp:196:29: fix warning: unused variable ‘temp’
themanyone Sep 18, 2025
96ee323
connect.cpp: fix warnings: comparison of integer expressions of diffe…
themanyone Sep 18, 2025
3e9ecdd
connect.cpp: Qualify calls to static member functions inside the lambdas
themanyone Sep 18, 2025
00f1d0e
connect.cpp:219:51: fix warning: unused variable ‘temp’
themanyone Sep 18, 2025
1805ec3
shared.cpp: fix warning: comparison of integer expressions of differe…
themanyone Sep 18, 2025
64188af
stlinit.cpp:206: use setZero() instead of memset that generates warnings
themanyone Sep 18, 2025
c422bda
util.cpp:327:9: fix warning: this ‘if’ clause does not guard
themanyone Sep 18, 2025
e55179c
ShadersES.hpp: fix warninges about unusd defines (comment out)
themanyone Sep 18, 2025
0bc8b25
shared.cpp: Use size_t instead of int/uint32_t to fix comparison warn…
themanyone Sep 18, 2025
3afea2e
CutSurface.cpp:683:36: fix warnings: comparison of integer expression…
themanyone Sep 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions bundled_deps/admesh/admesh/connect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,12 @@ struct HashTableEdges {

void insert_edge_exact(stl_file *stl, const HashEdge &edge)
{
this->insert_edge(stl, edge, [stl](const HashEdge& edge1, const HashEdge& edge2) { record_neighbors(stl, edge1, edge2); });
this->insert_edge(stl, edge, [stl](const HashEdge& edge1, const HashEdge& edge2) { HashTableEdges::record_neighbors(stl, edge1, edge2); });
}

void insert_edge_nearby(stl_file *stl, const HashEdge &edge)
{
this->insert_edge(stl, edge, [stl](const HashEdge& edge1, const HashEdge& edge2) { match_neighbors_nearby(stl, edge1, edge2); });
this->insert_edge(stl, edge, [stl](const HashEdge& edge1, const HashEdge& edge2) { HashTableEdges::match_neighbors_nearby(stl, edge1, edge2); });
}

// Hash table on edges
Expand Down Expand Up @@ -216,7 +216,6 @@ struct HashTableEdges {
// This is a match. Record result in neighbors list.
match_neighbors(edge, *link->next);
// Delete the matched edge from the list.
HashEdge *temp = link->next;
link->next = link->next->next;
// pool.destroy(temp);
#ifndef NDEBUG
Expand Down Expand Up @@ -482,9 +481,10 @@ void stl_check_facets_nearby(stl_file *stl, float tolerance)
{
assert(stl->stats.connected_facets_3_edge <= stl->stats.connected_facets_2_edge);
assert(stl->stats.connected_facets_2_edge <= stl->stats.connected_facets_1_edge);
assert(stl->stats.connected_facets_1_edge <= stl->stats.number_of_facets);
// cast number_of_facets to int to avoid signed/unsigned comparison warnings
assert(stl->stats.connected_facets_1_edge <= static_cast<int>(stl->stats.number_of_facets));

if (stl->stats.connected_facets_3_edge == stl->stats.number_of_facets)
if (stl->stats.connected_facets_3_edge == static_cast<int>(stl->stats.number_of_facets))
// No need to check any further. All facets are connected.
return;

Expand Down Expand Up @@ -533,7 +533,8 @@ void stl_remove_unconnected_facets(stl_file *stl)
for (int i = 0; i < 3; ++ i)
if (neighbors.neighbor[i] != -1) {
int &other_face_idx = stl->neighbors_start[neighbors.neighbor[i]].neighbor[(neighbors.which_vertex_not[i] + 1) % 3];
if (other_face_idx != stl->stats.number_of_facets) {
// compare with casted value to avoid signed/unsigned mismatch
if (other_face_idx != static_cast<int>(stl->stats.number_of_facets)) {
BOOST_LOG_TRIVIAL(info) << "in remove_facet: neighbor = " << other_face_idx << " numfacets = " << stl->stats.number_of_facets << " this is wrong";
return;
}
Expand Down
3 changes: 1 addition & 2 deletions bundled_deps/admesh/admesh/normals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,11 @@ void stl_fix_normal_directions(stl_file *stl)
// Get next facet to fix from top of list.
if (head->next != tail) {
facet_num = head->next->facet_num;
assert(facet_num < stl->stats.number_of_facets);
assert(static_cast<uint32_t>(facet_num) < stl->stats.number_of_facets);
if (norm_sw[facet_num] != 1) { // If facet is in list mutiple times
norm_sw[facet_num] = 1; // Record this one as being fixed.
++ checked;
}
stl_normal *temp = head->next; // Delete this facet from the list.
head->next = head->next->next;
// pool.destroy(temp);
} else { // If we ran out of facets to fix: All of the facets in this part have been fixed.
Expand Down
6 changes: 3 additions & 3 deletions bundled_deps/admesh/admesh/shared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ bool its_write_off(const indexed_triangle_set &its, const char *file)

fprintf(fp, "OFF\n");
fprintf(fp, "%d %d 0\n", (int)its.vertices.size(), (int)its.indices.size());
for (int i = 0; i < its.vertices.size(); ++ i)
for (size_t i = 0; i < its.vertices.size(); ++ i)
fprintf(fp, "\t%f %f %f\n", its.vertices[i](0), its.vertices[i](1), its.vertices[i](2));
for (uint32_t i = 0; i < its.indices.size(); ++ i)
for (size_t i = 0; i < its.indices.size(); ++ i)
fprintf(fp, "\t3 %d %d %d\n", its.indices[i][0], its.indices[i][1], its.indices[i][2]);
fclose(fp);
return true;
Expand Down Expand Up @@ -172,7 +172,7 @@ bool its_write_vrml(const indexed_triangle_set &its, const char *file)
fprintf(fp, "\t\tDEF STLVertices Coordinate3 {\n");
fprintf(fp, "\t\t\tpoint [\n");

int i = 0;
size_t i = 0;
for (; i + 1 < its.vertices.size(); ++ i)
fprintf(fp, "\t\t\t\t%f %f %f,\n", its.vertices[i](0), its.vertices[i](1), its.vertices[i](2));
fprintf(fp, "\t\t\t\t%f %f %f]\n", its.vertices[i](0), its.vertices[i](1), its.vertices[i](2));
Expand Down
4 changes: 3 additions & 1 deletion bundled_deps/admesh/admesh/stlinit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ static bool stl_read(stl_file *stl, FILE *fp, int first_facet, bool first)
sscanf(normal_buf[2], "%f", &facet.normal(2)) != 1) {
// Normal was mangled. Maybe denormals or "not a number" were stored?
// Just reset the normal and silently ignore it.
memset(&facet.normal, 0, sizeof(facet.normal));
// Avoid raw-memory writes into non-trivially-copyable Eigen types.
facet.normal.setZero();
}
}

Expand Down Expand Up @@ -288,3 +289,4 @@ void stl_facet_stats(stl_file *stl, stl_facet facet, bool &first)
stl->stats.max = stl->stats.max.cwiseMax(facet.vertex[i]);
}
}

6 changes: 4 additions & 2 deletions bundled_deps/admesh/admesh/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,10 +324,12 @@ void stl_repair(
}

if (nearby_flag || fixall_flag) {
if (! tolerance_flag)
if (! tolerance_flag) {
tolerance = stl->stats.shortest_edge;
if (! increment_flag)
}
if (! increment_flag){
increment = stl->stats.bounding_diameter / 10000.0;
}
}

if (stl->stats.connected_facets_3_edge < int(stl->stats.number_of_facets)) {
Expand Down
3 changes: 2 additions & 1 deletion bundled_deps/avrdude/avrdude/avr.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ int avr_tpi_chip_erase(PROGRAMMER * pgm, AVRPART * p)
0xFF
};

while (avr_tpi_poll_nvmbsy(pgm));
while (avr_tpi_poll_nvmbsy(pgm))
;

err = pgm->cmd_tpi(pgm, cmd, sizeof(cmd), NULL, 0);
if(err)
Expand Down
3 changes: 1 addition & 2 deletions bundled_deps/avrdude/avrdude/buspirate.c
Original file line number Diff line number Diff line change
Expand Up @@ -568,8 +568,7 @@ static int buspirate_start_mode_bin(struct programmer_t *pgm)
memset(buf, 0, sizeof(buf));
buspirate_recv_bin(pgm, buf, 4);
if (sscanf((const char*)buf, submode->entered_format, &PDATA(pgm)->submode_version) != 1) {
avrdude_message(MSG_INFO, "%s mode not confirmed: '%s'\n",
submode->name, buf);
avrdude_message(MSG_INFO, "BusPirate submode not confirmed: '%s'\n", buf);
buspirate_reset_from_binmode(pgm);
return -1;
}
Expand Down
4 changes: 2 additions & 2 deletions src/clipper/clipper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ void ReversePolyPtLinks(OutPt *pp)

inline void InitEdge(TEdge* e, TEdge* eNext, TEdge* ePrev, const IntPoint& Pt)
{
std::memset(e, 0, sizeof(TEdge));
*e = TEdge();
e->Next = eNext;
e->Prev = ePrev;
e->Curr = Pt;
Expand Down Expand Up @@ -786,7 +786,7 @@ bool ClipperBase::AddPathInternal(const Path &pg, int highI, PolyType PolyTyp, b
throw clipperException("AddPath: Open paths have been disabled.");
#endif

assert(highI >= 0 && highI < pg.size());
assert(highI >= 0 && static_cast<decltype(pg.size())>(highI) < pg.size());

//1. Basic (first) edge initialization ...
try
Expand Down
6 changes: 3 additions & 3 deletions src/libslic3r/CutSurface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -680,9 +680,9 @@ indexed_triangle_set Slic3r::cut2model(const SurfaceCut &cut,
assert(i.x() + back_offset < result.vertices.size());
assert(i.y() + back_offset < result.vertices.size());
assert(i.z() + back_offset < result.vertices.size());
assert(i.x() >= 0 && i.x() < cut.vertices.size());
assert(i.y() >= 0 && i.y() < cut.vertices.size());
assert(i.z() >= 0 && i.z() < cut.vertices.size());
assert(i.x() >= 0 && i.x() < static_cast<int>(cut.vertices.size()));
assert(i.y() >= 0 && i.y() < static_cast<int>(cut.vertices.size()));
assert(i.z() >= 0 && i.z() < static_cast<int>(cut.vertices.size()));
// Y and Z is swapped CCW triangles for back side
result.indices.emplace_back(i.x() + back_offset,
i.z() + back_offset,
Expand Down
Loading