[Bf-blender-cvs] [56ede578e74] master: Cleanup: compiler warnings: unused args, missing include, parenthesis
Campbell Barton
noreply at git.blender.org
Tue Jun 7 05:16:30 CEST 2022
Commit: 56ede578e743af42ab8682a01e1f346c1acef0df
Author: Campbell Barton
Date: Tue Jun 7 11:50:10 2022 +1000
Branches: master
https://developer.blender.org/rB56ede578e743af42ab8682a01e1f346c1acef0df
Cleanup: compiler warnings: unused args, missing include, parenthesis
===================================================================
M source/blender/io/stl/importer/stl_import_ascii_reader.cc
M source/blender/io/stl/importer/stl_import_binary_reader.cc
M source/blender/nodes/geometry/nodes/node_geo_input_instance_rotation.cc
M source/blender/nodes/geometry/nodes/node_geo_input_instance_scale.cc
===================================================================
diff --git a/source/blender/io/stl/importer/stl_import_ascii_reader.cc b/source/blender/io/stl/importer/stl_import_ascii_reader.cc
index 2f2495fa4ca..2edb3c6a114 100644
--- a/source/blender/io/stl/importer/stl_import_ascii_reader.cc
+++ b/source/blender/io/stl/importer/stl_import_ascii_reader.cc
@@ -24,6 +24,7 @@
#include "fast_float.h"
#include "stl_import.hh"
+#include "stl_import_ascii_reader.hh"
#include "stl_import_mesh.hh"
namespace blender::io::stl {
diff --git a/source/blender/io/stl/importer/stl_import_binary_reader.cc b/source/blender/io/stl/importer/stl_import_binary_reader.cc
index c05b6ad1426..6eaed16160e 100644
--- a/source/blender/io/stl/importer/stl_import_binary_reader.cc
+++ b/source/blender/io/stl/importer/stl_import_binary_reader.cc
@@ -41,7 +41,7 @@ Mesh *read_stl_binary(FILE *file, Main *bmain, char *mesh_name, bool use_custom_
Array<STLBinaryTriangle> tris_buf(chunk_size);
STLMeshHelper stl_mesh(num_tris, use_custom_normals);
size_t num_read_tris;
- while (num_read_tris = fread(tris_buf.data(), sizeof(STLBinaryTriangle), chunk_size, file)) {
+ while ((num_read_tris = fread(tris_buf.data(), sizeof(STLBinaryTriangle), chunk_size, file))) {
for (size_t i = 0; i < num_read_tris; i++) {
if (use_custom_normals) {
stl_mesh.add_triangle(tris_buf[i].v1, tris_buf[i].v2, tris_buf[i].v3, tris_buf[i].normal);
diff --git a/source/blender/nodes/geometry/nodes/node_geo_input_instance_rotation.cc b/source/blender/nodes/geometry/nodes/node_geo_input_instance_rotation.cc
index a6d6722ae2a..4c7a148a797 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_input_instance_rotation.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_input_instance_rotation.cc
@@ -16,8 +16,8 @@ class VectorFieldInput final : public GeometryFieldInput {
}
GVArray get_varray_for_context(const GeometryComponent &component,
- const eAttrDomain domain,
- IndexMask mask) const final
+ const eAttrDomain UNUSED(domain),
+ IndexMask UNUSED(mask)) const final
{
if (component.type() != GEO_COMPONENT_TYPE_INSTANCES) {
return {};
diff --git a/source/blender/nodes/geometry/nodes/node_geo_input_instance_scale.cc b/source/blender/nodes/geometry/nodes/node_geo_input_instance_scale.cc
index f2abc592f72..b3a362fbf3e 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_input_instance_scale.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_input_instance_scale.cc
@@ -16,8 +16,8 @@ class VectorFieldInput final : public GeometryFieldInput {
}
GVArray get_varray_for_context(const GeometryComponent &component,
- const eAttrDomain domain,
- IndexMask mask) const final
+ const eAttrDomain UNUSED(domain),
+ IndexMask UNUSED(mask)) const final
{
if (component.type() != GEO_COMPONENT_TYPE_INSTANCES) {
return {};
More information about the Bf-blender-cvs
mailing list