Commits

Jed Brown  committed 3c924e8

Mat Chaco: remove another case of PETSC_DEFAULT out of range of enum

The old code generates a compiler warning with clang-3.3, but passing
the out-of-range argument is likely a warning with other compilers.

  • Participants
  • Parent commits 57488fd

Comments (0)

Files changed (1)

File src/mat/partition/impls/chaco/chaco.c

   MatPartitioning_Chaco *chaco = (MatPartitioning_Chaco*)part->data;
 
   PetscFunctionBegin;
-  if (method==PETSC_DEFAULT) chaco->local_method = MP_CHACO_KERNIGHAN;
-  else {
-    switch (method) {
-      case MP_CHACO_KERNIGHAN:
-      case MP_CHACO_NONE:
-        chaco->local_method = method; break;
-      default:
-        SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Chaco: Unknown or unsupported option");
-    }
+  switch (method) {
+  case MP_CHACO_KERNIGHAN:
+  case MP_CHACO_NONE:
+    chaco->local_method = method; break;
+  default:
+    SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Chaco: Unknown or unsupported option");
   }
   PetscFunctionReturn(0);
 }