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.

Comments (0)

Files changed (1)

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);
 }
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.