getfem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Getfem-commits] (no subject)


From: Tetsuo Koyama
Subject: [Getfem-commits] (no subject)
Date: Tue, 5 Feb 2019 00:19:38 -0500 (EST)

branch: devel-tetsuo-fix-error-by-Werror
commit 94dad7fbb8702cc9101a96a92a5a401ce1485634
Author: Tetsuo Koyama <address@hidden>
Date:   Tue Feb 5 14:18:53 2019 +0900

    Fix warning: this statement may fall through [-Wimplicit-fallthrough=]
---
 src/getfem_generic_assembly_semantic.cc | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/getfem_generic_assembly_semantic.cc 
b/src/getfem_generic_assembly_semantic.cc
index f5ff172..ad170f5 100644
--- a/src/getfem_generic_assembly_semantic.cc
+++ b/src/getfem_generic_assembly_semantic.cc
@@ -331,6 +331,7 @@ namespace getfem {
     case GA_NODE_INTERPOLATE_DERIVATIVE:
       c += 2.321*ga_hash_code(pnode->interpolate_name_der);
       // No break. The hash code is completed with the next item
+      [[fallthrough]];
     case GA_NODE_INTERPOLATE_VAL: case GA_NODE_INTERPOLATE_GRAD:
     case GA_NODE_INTERPOLATE_HESS: case GA_NODE_INTERPOLATE_DIVERG:
     case GA_NODE_INTERPOLATE_VAL_TEST: case GA_NODE_INTERPOLATE_GRAD_TEST:
@@ -525,6 +526,7 @@ namespace getfem {
         ga_throw_error(pnode->expr, pnode->pos, "Secondary domain used "
                        "in a single domain term.");
       // continue with what follows
+      [[fallthrough]];
     case GA_NODE_INTERPOLATE:
       if (pnode->name.compare("X") == 0) {
         if (pnode->node_type == GA_NODE_INTERPOLATE) {
@@ -549,6 +551,7 @@ namespace getfem {
         break;
       }
       // else continue with what follows
+      [[fallthrough]];
     case GA_NODE_ELEMENTARY: // and ... case GA_NODE_INTERPOLATE:
     case GA_NODE_XFEM_PLUS:
     case GA_NODE_XFEM_MINUS:
@@ -2832,6 +2835,7 @@ namespace getfem {
     case GA_NODE_INTERPOLATE_FILTER:
       if (!child_0_is_constant) { is_constant = false; break; }
       // No break intentionally
+      [[fallthrough]];
     case GA_NODE_INTERPOLATE_VAL_TEST:
     case GA_NODE_INTERPOLATE_GRAD_TEST:
     case GA_NODE_INTERPOLATE_DIVERG_TEST:
@@ -4836,6 +4840,7 @@ namespace getfem {
       case GA_DIV: case GA_DOTDIV:
         if (mark1) return false;
         if (mark0) return ga_node_is_affine(child0);
+        [[fallthrough]];
 
       default: GMM_ASSERT1(false, "Unexpected operation. Internal error.");
       }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]