Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorRay Molenkamp <github@lazydodo.com>2019-05-27 20:29:24 +0300
committerRay Molenkamp <github@lazydodo.com>2019-05-27 20:29:24 +0300
commit4778dfa5684fe1f3b6f323e251ee7a2ec0e1ff6f (patch)
tree56aa7dec5924ed8dbcfdafffe13694aab4f9232b /source
parent8a484aca2244c1e4e18dbdc927d8ff7660b29c62 (diff)
Cleanup: Fix warnings in bf_physics
MSVC did not detect the usage of i in the openmp loops and emitted a unused variable warning.
Diffstat (limited to 'source')
-rw-r--r--source/blender/physics/intern/implicit_blender.c7
1 files changed, 3 insertions, 4 deletions
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]);
}
}