From e17fdcd639f8c2aa566913b18ceff04a3f624f9c Mon Sep 17 00:00:00 2001
From: Florent Pruvost <florent.pruvost@inria.fr>
Date: Mon, 12 Sep 2016 08:49:34 +0000
Subject: [PATCH] chameleon: cleaning to avoid warning

---
 compute/pzbuild.c                           | 6 +++---
 compute/pzgelqf.c                           | 8 +-------
 example/out_of_core/out_of_core.c           | 4 ++++
 runtime/starpu/codelets/codelet_zbuild.c    | 2 --
 runtime/starpu/control/runtime_descriptor.c | 2 --
 5 files changed, 8 insertions(+), 14 deletions(-)

diff --git a/compute/pzbuild.c b/compute/pzbuild.c
index 9489200da..2dc7586d7 100644
--- a/compute/pzbuild.c
+++ b/compute/pzbuild.c
@@ -76,9 +76,9 @@ void morse_pzbuild( MORSE_enum uplo, MORSE_desc_t *A, void *user_data, void* use
     ldam = BLKLDD(A, m);
     for (n = 0; n < A->nt; n++) {
 
-      if ( uplo == MorseUpper && m <= n ||
-           uplo == MorseLower && m >= n ||
-           uplo == MorseUpperLower)
+      if ( ( uplo == MorseUpper && m <= n ) ||
+           ( uplo == MorseLower && m >= n ) ||
+           ( uplo == MorseUpperLower ) )
         MORSE_TASK_zbuild(
               &options,
               A(m, n), ldam,
diff --git a/compute/pzgelqf.c b/compute/pzgelqf.c
index f8969bc0b..1e2a17ccf 100644
--- a/compute/pzgelqf.c
+++ b/compute/pzgelqf.c
@@ -53,7 +53,7 @@ void morse_pzgelqf(MORSE_desc_t *A, MORSE_desc_t *T,
     int k, m, n;
     int ldak, ldam;
     int tempkm, tempkn, tempmm, tempnn;
-    int ib, minMT;
+    int ib;
 
     morse = morse_context_self();
     if (sequence->status != MORSE_SUCCESS)
@@ -62,12 +62,6 @@ void morse_pzgelqf(MORSE_desc_t *A, MORSE_desc_t *T,
 
     ib = MORSE_IB;
 
-    if (A->m > A->n) {
-        minMT = A->nt;
-    } else {
-        minMT = A->mt;
-    }
-
     /*
      * zgelqt = A->nb * (ib+1)
      * zunmlq = A->nb * ib
diff --git a/example/out_of_core/out_of_core.c b/example/out_of_core/out_of_core.c
index cf468ad45..a2551f1fa 100644
--- a/example/out_of_core/out_of_core.c
+++ b/example/out_of_core/out_of_core.c
@@ -97,6 +97,10 @@ int main(int argc, char *argv[]) {
     if (iparam[IPARAM_OUTOFCORE] > 0) {
         int new_dd = starpu_disk_register (&starpu_disk_unistd_o_direct_ops,
                                            (void*) "./ooc/", 1024*1024*10);
+        if (new_dd == -ENOENT){
+            fprintf(stderr, "Can't write on ./ooc/\n");
+        	return EXIT_FAILURE;
+        }
     }
 
     MORSE_Desc_Create_User(&descA, NULL, MorseRealDouble,
diff --git a/runtime/starpu/codelets/codelet_zbuild.c b/runtime/starpu/codelets/codelet_zbuild.c
index 8adaed7c4..0768ad62b 100644
--- a/runtime/starpu/codelets/codelet_zbuild.c
+++ b/runtime/starpu/codelets/codelet_zbuild.c
@@ -69,8 +69,6 @@ void MORSE_TASK_zbuild( MORSE_option_t *options,
 
 static void cl_zbuild_cpu_func(void *descr[], void *cl_arg)
 {
-  int Am;
-  int An;
   MORSE_Complex64_t *A;
   int ld;
   void *user_data;
diff --git a/runtime/starpu/control/runtime_descriptor.c b/runtime/starpu/control/runtime_descriptor.c
index 313ceff09..0182d776f 100644
--- a/runtime/starpu/control/runtime_descriptor.c
+++ b/runtime/starpu/control/runtime_descriptor.c
@@ -112,8 +112,6 @@ void RUNTIME_desc_create( MORSE_desc_t *desc )
      */
     {
         static int _tag_mpi_initialized_ = 0;
-        MORSE_context_t *morse;
-        int myrank = desc->myrank;
 
         if (!_tag_mpi_initialized_) {
             int *tag_ub = NULL;
-- 
GitLab