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
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-12-23 00:29:44 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-12-23 00:29:44 +0400
commit4d7c44717aa67671518431183d38dab5d2a7a3dd (patch)
tree7738e22f5990b9bfbd4d15c845990b41b91728b1 /intern/opennl
parent3563f677f88baf7b1f68d7f435787e3bf4a20d24 (diff)
Code cleanup: fix some clang static checker warnings.
Diffstat (limited to 'intern/opennl')
-rw-r--r--intern/opennl/intern/opennl.c2
-rw-r--r--intern/opennl/superlu/get_perm_c.c18
-rw-r--r--intern/opennl/superlu/scolumn_bmod.c1
-rw-r--r--intern/opennl/superlu/strsv.c13
-rw-r--r--intern/opennl/superlu/sutil.c4
-rw-r--r--intern/opennl/superlu/util.h3
6 files changed, 12 insertions, 29 deletions
diff --git a/intern/opennl/intern/opennl.c b/intern/opennl/intern/opennl.c
index c3fb7135fcb..20b4c0a6681 100644
--- a/intern/opennl/intern/opennl.c
+++ b/intern/opennl/intern/opennl.c
@@ -1137,7 +1137,7 @@ static NLboolean __nlInvert_SUPERLU(__NLContext *context) {
/* SuperLU variables */
SuperMatrix B;
- NLint info;
+ NLint info = 0;
for(j=0; j<context->nb_rhs; j++, b+=n, x+=n) {
/* Create superlu array for B */
diff --git a/intern/opennl/superlu/get_perm_c.c b/intern/opennl/superlu/get_perm_c.c
index 2eb0aea678e..320fe3471f4 100644
--- a/intern/opennl/superlu/get_perm_c.c
+++ b/intern/opennl/superlu/get_perm_c.c
@@ -368,7 +368,7 @@ get_perm_c(int ispec, SuperMatrix *A, int *perm_c)
int m, n, bnz, *b_colptr, i;
int delta, maxint, nofsub, *invp;
int *b_rowind, *dhead, *qsize, *llist, *marker;
- double t, SuperLU_timer_();
+ /* double t, SuperLU_timer_(); */
/* make gcc happy */
b_rowind=NULL;
@@ -377,7 +377,7 @@ get_perm_c(int ispec, SuperMatrix *A, int *perm_c)
m = A->nrow;
n = A->ncol;
- t = SuperLU_timer_();
+ /* t = SuperLU_timer_(); */
switch ( ispec ) {
case 0: /* Natural ordering */
for (i = 0; i < n; ++i) perm_c[i] = i;
@@ -391,8 +391,8 @@ get_perm_c(int ispec, SuperMatrix *A, int *perm_c)
#if ( PRNTlevel>=1 )
printf("Use minimum degree ordering on A'*A.\n");
#endif
- t = SuperLU_timer_() - t;
- /*printf("Form A'*A time = %8.3f\n", t);*/
+ /*t = SuperLU_timer_() - t;
+ printf("Form A'*A time = %8.3f\n", t);*/
break;
case 2: /* Minimum degree ordering on A'+A */
if ( m != n ) ABORT("Matrix is not square");
@@ -401,8 +401,8 @@ get_perm_c(int ispec, SuperMatrix *A, int *perm_c)
#if ( PRNTlevel>=1 )
printf("Use minimum degree ordering on A'+A.\n");
#endif
- t = SuperLU_timer_() - t;
- /*printf("Form A'+A time = %8.3f\n", t);*/
+ /*t = SuperLU_timer_() - t;
+ printf("Form A'+A time = %8.3f\n", t);*/
break;
case 3: /* Approximate minimum degree column ordering. */
get_colamd(m, n, Astore->nnz, Astore->colptr, Astore->rowind,
@@ -417,7 +417,7 @@ get_perm_c(int ispec, SuperMatrix *A, int *perm_c)
}
if ( bnz != 0 ) {
- t = SuperLU_timer_();
+ /* t = SuperLU_timer_(); */
/* Initialize and allocate storage for GENMMD. */
delta = 1; /* DELTA is a parameter to allow the choice of nodes
@@ -452,8 +452,8 @@ get_perm_c(int ispec, SuperMatrix *A, int *perm_c)
SUPERLU_FREE(llist);
SUPERLU_FREE(marker);
- t = SuperLU_timer_() - t;
- /* printf("call GENMMD time = %8.3f\n", t);*/
+ /* t = SuperLU_timer_() - t;
+ printf("call GENMMD time = %8.3f\n", t);*/
} else { /* Empty adjacency structure */
for (i = 0; i < n; ++i) perm_c[i] = i;
diff --git a/intern/opennl/superlu/scolumn_bmod.c b/intern/opennl/superlu/scolumn_bmod.c
index cb8d83686be..3d4f5968778 100644
--- a/intern/opennl/superlu/scolumn_bmod.c
+++ b/intern/opennl/superlu/scolumn_bmod.c
@@ -303,7 +303,6 @@ scolumn_bmod (
d_fsupc=0 if fsupc >= fpanelc. */
d_fsupc = fst_col - fsupc;
- lptr = xlsub[fsupc] + d_fsupc;
luptr = xlusup[fst_col] + d_fsupc;
nsupr = xlsub[fsupc+1] - xlsub[fsupc]; /* Leading dimension */
nsupc = jcol - fst_col; /* Excluding jcol */
diff --git a/intern/opennl/superlu/strsv.c b/intern/opennl/superlu/strsv.c
index a1d66ed7341..da904ba3e9d 100644
--- a/intern/opennl/superlu/strsv.c
+++ b/intern/opennl/superlu/strsv.c
@@ -9,9 +9,6 @@ int strsv_(char *, char *, char *, int *, float *, int *, float *, int *);
{
- /* System generated locals */
- int i__1, i__2;
-
/* Local variables */
static int info;
static float temp;
@@ -213,14 +210,12 @@ int strsv_(char *, char *, char *, int *, float *, int *, float *, int *);
}
} else {
if (*incx == 1) {
- i__1 = *n;
for (j = 1; j <= *n; ++j) {
if (X(j) != 0.f) {
if (nounit) {
X(j) /= A(j,j);
}
temp = X(j);
- i__2 = *n;
for (i = j + 1; i <= *n; ++i) {
X(i) -= temp * A(i,j);
/* L50: */
@@ -230,7 +225,6 @@ int strsv_(char *, char *, char *, int *, float *, int *, float *, int *);
}
} else {
jx = kx;
- i__1 = *n;
for (j = 1; j <= *n; ++j) {
if (X(jx) != 0.f) {
if (nounit) {
@@ -238,7 +232,6 @@ int strsv_(char *, char *, char *, int *, float *, int *, float *, int *);
}
temp = X(jx);
ix = jx;
- i__2 = *n;
for (i = j + 1; i <= *n; ++i) {
ix += *incx;
X(ix) -= temp * A(i,j);
@@ -256,10 +249,8 @@ int strsv_(char *, char *, char *, int *, float *, int *, float *, int *);
if (lsame_(uplo, "U")) {
if (*incx == 1) {
- i__1 = *n;
for (j = 1; j <= *n; ++j) {
temp = X(j);
- i__2 = j - 1;
for (i = 1; i <= j-1; ++i) {
temp -= A(i,j) * X(i);
/* L90: */
@@ -272,11 +263,9 @@ int strsv_(char *, char *, char *, int *, float *, int *, float *, int *);
}
} else {
jx = kx;
- i__1 = *n;
for (j = 1; j <= *n; ++j) {
temp = X(jx);
ix = kx;
- i__2 = j - 1;
for (i = 1; i <= j-1; ++i) {
temp -= A(i,j) * X(ix);
ix += *incx;
@@ -294,7 +283,6 @@ int strsv_(char *, char *, char *, int *, float *, int *, float *, int *);
if (*incx == 1) {
for (j = *n; j >= 1; --j) {
temp = X(j);
- i__1 = j + 1;
for (i = *n; i >= j+1; --i) {
temp -= A(i,j) * X(i);
/* L130: */
@@ -311,7 +299,6 @@ int strsv_(char *, char *, char *, int *, float *, int *, float *, int *);
for (j = *n; j >= 1; --j) {
temp = X(jx);
ix = kx;
- i__1 = j + 1;
for (i = *n; i >= j+1; --i) {
temp -= A(i,j) * X(ix);
ix -= *incx;
diff --git a/intern/opennl/superlu/sutil.c b/intern/opennl/superlu/sutil.c
index 510ade8233c..a77e87b9c65 100644
--- a/intern/opennl/superlu/sutil.c
+++ b/intern/opennl/superlu/sutil.c
@@ -370,8 +370,6 @@ void
sFillRHS(trans_t trans, int nrhs, float *x, int ldx,
SuperMatrix *A, SuperMatrix *B)
{
- NCformat *Astore;
- float *Aval;
DNformat *Bstore;
float *rhs;
float one = 1.0;
@@ -379,8 +377,6 @@ sFillRHS(trans_t trans, int nrhs, float *x, int ldx,
int ldc;
char transc[1];
- Astore = A->Store;
- Aval = (float *) Astore->nzval;
Bstore = B->Store;
rhs = Bstore->nzval;
ldc = Bstore->lda;
diff --git a/intern/opennl/superlu/util.h b/intern/opennl/superlu/util.h
index f13108b2256..c4c478cec2b 100644
--- a/intern/opennl/superlu/util.h
+++ b/intern/opennl/superlu/util.h
@@ -24,7 +24,8 @@
#define NUM_TEMPV(m,w,t,b) ( SUPERLU_MAX(m, (t + b)*w) )
#ifndef USER_ABORT
-#define USER_ABORT(msg) superlu_abort_and_exit(msg)
+#define USER_ABORT(msg) \
+ { fprintf(stderr, "%s", msg); exit (-1); }
#endif
#define ABORT(err_msg) \