getfem-commits
[Top][All Lists]
Advanced

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

[Getfem-commits] [getfem-commits] branch master updated: Fix compilation


From: Konstantinos Poulios
Subject: [Getfem-commits] [getfem-commits] branch master updated: Fix compilation warnings
Date: Tue, 17 Oct 2023 07:25:44 -0400

This is an automated email from the git hooks/post-receive script.

logari81 pushed a commit to branch master
in repository getfem.

The following commit(s) were added to refs/heads/master by this push:
     new 7212d870 Fix compilation warnings
7212d870 is described below

commit 7212d870eee9ea12cfd82fbd1a6b78dd200be2c2
Author: Konstantinos Poulios <logari81@gmail.com>
AuthorDate: Tue Oct 17 13:25:32 2023 +0200

    Fix compilation warnings
    
     - use [[fallthrough]] attribute in switch
       (requires MSVC version >= 17)
    
     - warning-free compilation of C++ and Python libraries,
       and all tests with gcc version 13
---
 src/getfem_generic_assembly_semantic.cc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/getfem_generic_assembly_semantic.cc 
b/src/getfem_generic_assembly_semantic.cc
index 714c4d19..58289d3c 100644
--- a/src/getfem_generic_assembly_semantic.cc
+++ b/src/getfem_generic_assembly_semantic.cc
@@ -340,7 +340,7 @@ namespace getfem {
       break;
     case GA_NODE_INTERPOLATE_DERIVATIVE:
       c += 2.321*ga_hash_code(pnode->interpolate_name_der);
-      //[[fallthrough]]; // The hash code is completed with the next item
+      [[fallthrough]]; // The hash code is completed with the next item
     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:
@@ -558,7 +558,7 @@ namespace getfem {
       if (tree.secondary_domain.size() == 0)
         ga_throw_error(pnode->expr, pnode->pos, "Secondary domain used "
                        "in a single domain term.");
-      //[[fallthrough]];
+      [[fallthrough]];
     case GA_NODE_INTERPOLATE:
       if (pnode->name.compare("X") == 0) {
         if (pnode->node_type == GA_NODE_INTERPOLATE) {
@@ -599,7 +599,7 @@ namespace getfem {
         }
         break;
       }
-      //[[fallthrough]];
+      [[fallthrough]];
     case GA_NODE_ELEMENTARY: // +GA_NODE_SECONDARY_DOMAIN, GA_NODE_INTERPOLATE:
     case GA_NODE_XFEM_PLUS:
     case GA_NODE_XFEM_MINUS:
@@ -3011,7 +3011,7 @@ namespace getfem {
         is_constant = false;
         break;
       }
-      //[[fallthrough]];
+      [[fallthrough]];
     case GA_NODE_INTERPOLATE_VAL_TEST:
     case GA_NODE_INTERPOLATE_GRAD_TEST:
     case GA_NODE_INTERPOLATE_DIVERG_TEST:



reply via email to

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