diff --git a/xs/src/admesh/stlinit.c b/xs/src/admesh/stlinit.c
index e6f3556f2..3a5de9052 100644
--- a/xs/src/admesh/stlinit.c
+++ b/xs/src/admesh/stlinit.c
@@ -69,7 +69,7 @@ stl_count_facets(stl_file *stl, char *file) {
   long           file_size;
   int            header_num_facets;
   int            num_facets;
-  int            i, j;
+  int            i;
   size_t         s;
   unsigned char  chtest[128];
   int            num_lines = 1;
diff --git a/xs/src/libslic3r/BridgeDetector.cpp b/xs/src/libslic3r/BridgeDetector.cpp
index 7c7a81551..24140c7b2 100644
--- a/xs/src/libslic3r/BridgeDetector.cpp
+++ b/xs/src/libslic3r/BridgeDetector.cpp
@@ -293,8 +293,8 @@ BridgeDetector::unsupported_edges(double angle, Polylines* unsupported) const
         TODO: angle tolerance should probably be based on segment length and flow width,
         so that we build supports whenever there's a chance that at least one or two bridge
         extrusions would be anchored within such length (i.e. a slightly non-parallel bridging
-        direction might still benefit from anchors if long enough) */
-    double angle_tolerance = PI / 180.0 * 5.0;
+        direction might still benefit from anchors if long enough)
+        double angle_tolerance = PI / 180.0 * 5.0; */
     for (Polylines::const_iterator polyline = _unsupported.begin(); polyline != _unsupported.end(); ++polyline) {
         Lines lines = polyline->lines();
         for (Lines::const_iterator line = lines.begin(); line != lines.end(); ++line) {
diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp
index d074bbd1f..8f4f98260 100644
--- a/xs/src/libslic3r/GCode.cpp
+++ b/xs/src/libslic3r/GCode.cpp
@@ -435,7 +435,6 @@ GCode::extrude(ExtrusionLoop loop, std::string description, double speed)
     
     // make a little move inwards before leaving loop
     if (paths.back().role == erExternalPerimeter && this->layer != NULL && this->config.perimeters > 1) {
-        Polyline &last_path_polyline = paths.back().polyline;
         // detect angle between last and first segment
         // the side depends on the original winding order of the polygon (left for contours, right for holes)
         Point a = paths.front().polyline.points[1];  // second point
diff --git a/xs/src/libslic3r/Model.cpp b/xs/src/libslic3r/Model.cpp
index 1e198b6f3..f31bd9b25 100644
--- a/xs/src/libslic3r/Model.cpp
+++ b/xs/src/libslic3r/Model.cpp
@@ -162,12 +162,10 @@ Model::has_objects_with_no_instances() const
 bool
 Model::add_default_instances()
 {
-    bool added = false;
     // apply a default position to all objects not having one
     for (ModelObjectPtrs::const_iterator o = this->objects.begin(); o != this->objects.end(); ++o) {
         if ((*o)->instances.empty()) {
             (*o)->add_instance();
-            added = true;
         }
     }
     return true;
diff --git a/xs/src/libslic3r/MotionPlanner.cpp b/xs/src/libslic3r/MotionPlanner.cpp
index 2ebf2019c..f8e7d1dd9 100644
--- a/xs/src/libslic3r/MotionPlanner.cpp
+++ b/xs/src/libslic3r/MotionPlanner.cpp
@@ -127,13 +127,12 @@ MotionPlanner::shortest_path(const Point &from, const Point &to)
     // Now check whether points are inside the environment.
     Point inner_from    = from;
     Point inner_to      = to;
-    bool from_is_inside, to_is_inside;
-    
-    if (!(from_is_inside = env.contains(from))) {
+
+    if (!env.contains(from)) {
         // Find the closest inner point to start from.
         inner_from = this->nearest_env_point(env, from, to);
     }
-    if (!(to_is_inside = env.contains(to))) {
+    if (!env.contains(to)) {
         // Find the closest inner point to start from.
         inner_to = this->nearest_env_point(env, to, inner_from);
     }
diff --git a/xs/src/libslic3r/TriangleMesh.cpp b/xs/src/libslic3r/TriangleMesh.cpp
index 30ee5ad42..6e2f56312 100644
--- a/xs/src/libslic3r/TriangleMesh.cpp
+++ b/xs/src/libslic3r/TriangleMesh.cpp
@@ -100,7 +100,7 @@ TriangleMesh::repair() {
     stl.stats.facets_w_3_bad_edge = (stl.stats.number_of_facets - stl.stats.connected_facets_1_edge);
     
     // checking nearby
-    int last_edges_fixed = 0;
+    //int last_edges_fixed = 0;
     float tolerance = stl.stats.shortest_edge;
     float increment = stl.stats.bounding_diameter / 10000.0;
     int iterations = 2;
@@ -110,7 +110,7 @@ TriangleMesh::repair() {
                 //printf("Checking nearby. Tolerance= %f Iteration=%d of %d...", tolerance, i + 1, iterations);
                 stl_check_facets_nearby(&stl, tolerance);
                 //printf("  Fixed %d edges.\n", stl.stats.edges_fixed - last_edges_fixed);
-                last_edges_fixed = stl.stats.edges_fixed;
+                //last_edges_fixed = stl.stats.edges_fixed;
                 tolerance += increment;
             } else {
                 break;