[Bf-blender-cvs] [4778dfa5684] master: Cleanup: Fix warnings in bf_physics
Ray Molenkamp
noreply at git.blender.org
Mon May 27 19:29:29 CEST 2019
Commit: 4778dfa5684fe1f3b6f323e251ee7a2ec0e1ff6f
Author: Ray Molenkamp
Date: Mon May 27 11:29:24 2019 -0600
Branches: master
https://developer.blender.org/rB4778dfa5684fe1f3b6f323e251ee7a2ec0e1ff6f
Cleanup: Fix warnings in bf_physics
MSVC did not detect the usage of i in the openmp loops
and emitted a unused variable warning.
===================================================================
M source/blender/physics/intern/implicit_blender.c
===================================================================
diff --git a/source/blender/physics/intern/implicit_blender.c b/source/blender/physics/intern/implicit_blender.c
index cdd4d66d485..d64846e4dcc 100644
--- a/source/blender/physics/intern/implicit_blender.c
+++ b/source/blender/physics/intern/implicit_blender.c
@@ -608,17 +608,16 @@ DO_INLINE void initdiag_bfmatrix(fmatrix3x3 *matrix, float m3[3][3])
/* STATUS: verified */
DO_INLINE void mul_bfmatrix_lfvector(float (*to)[3], fmatrix3x3 *from, lfVector *fLongVector)
{
- unsigned int i = 0;
unsigned int vcount = from[0].vcount;
lfVector *temp = create_lfvector(vcount);
zero_lfvector(to, vcount);
-# pragma omp parallel sections private(i) if (vcount > CLOTH_OPENMP_LIMIT)
+# pragma omp parallel sections if (vcount > CLOTH_OPENMP_LIMIT)
{
# pragma omp section
{
- for (i = from[0].vcount; i < from[0].vcount + from[0].scount; i++) {
+ for (unsigned int i = from[0].vcount; i < from[0].vcount + from[0].scount; i++) {
/* This is the lower triangle of the sparse matrix,
* therefore multiplication occurs with transposed submatrices. */
muladd_fmatrixT_fvector(to[from[i].c], from[i].m, fLongVector[from[i].r]);
@@ -626,7 +625,7 @@ DO_INLINE void mul_bfmatrix_lfvector(float (*to)[3], fmatrix3x3 *from, lfVector
}
# pragma omp section
{
- for (i = 0; i < from[0].vcount + from[0].scount; i++) {
+ for (unsigned int i = 0; i < from[0].vcount + from[0].scount; i++) {
muladd_fmatrix_fvector(temp[from[i].r], from[i].m, fLongVector[from[i].c]);
}
}
More information about the Bf-blender-cvs
mailing list