]> https://gitweb.dealii.org/ - dealii.git/commitdiff
while(0)->while(false) 16026/head
authorDaniel Arndt <arndtd@ornl.gov>
Tue, 26 Sep 2023 01:51:20 +0000 (21:51 -0400)
committerDaniel Arndt <arndtd@ornl.gov>
Tue, 26 Sep 2023 01:51:20 +0000 (21:51 -0400)
include/deal.II/base/exceptions.h
include/deal.II/lac/petsc_snes.templates.h
include/deal.II/lac/petsc_ts.templates.h
source/lac/petsc_communication_pattern.cc
source/lac/petsc_compatibility.cc
source/lac/petsc_precondition.cc
source/lac/petsc_solver.cc

index 9e4f4ebfd60b740d5c6618b23b6639658f0d0112..a288637d6c6398e7c440d224ae905acadb734168 100644 (file)
@@ -1561,7 +1561,7 @@ namespace deal_II_exceptions
                 Kokkos::abort(#cond);                                          \
             }))                                                                \
           }                                                                    \
-        while (0)
+        while (false)
 #    else /*ifdef DEAL_II_HAVE_BUILTIN_EXPECT*/
 #      define Assert(cond, exc)                                                \
         do                                                                     \
@@ -1583,7 +1583,7 @@ namespace deal_II_exceptions
                 Kokkos::abort(#cond);                                          \
             }))                                                                \
           }                                                                    \
-        while (0)
+        while (false)
 #    endif /*ifdef DEAL_II_HAVE_BUILTIN_EXPECT*/
 #  else    /*if KOKKOS_VERSION >= 30600*/
 #    ifdef KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST
@@ -1602,7 +1602,7 @@ namespace deal_II_exceptions
                   #exc,                                                        \
                   exc);                                                        \
             }                                                                  \
-          while (0)
+          while (false)
 #      else /*ifdef DEAL_II_HAVE_BUILTIN_EXPECT*/
 #        define Assert(cond, exc)                                              \
           do                                                                   \
@@ -1618,7 +1618,7 @@ namespace deal_II_exceptions
                   #exc,                                                        \
                   exc);                                                        \
             }                                                                  \
-          while (0)
+          while (false)
 #      endif /*ifdef DEAL_II_HAVE_BUILTIN_EXPECT*/
 #    else    /*#ifdef KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST*/
 #      define Assert(cond, exc)     \
@@ -1627,7 +1627,7 @@ namespace deal_II_exceptions
             if (!(cond))            \
               Kokkos::abort(#cond); \
           }                         \
-        while (0)
+        while (false)
 #    endif /*ifdef KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST*/
 #  endif   /*KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST*/
 #else      /*ifdef DEBUG*/
@@ -1635,7 +1635,7 @@ namespace deal_II_exceptions
     do                      \
       {                     \
       }                     \
-    while (0)
+    while (false)
 #endif /*ifdef DEBUG*/
 
 
@@ -1675,7 +1675,7 @@ namespace deal_II_exceptions
             ::dealii::deal_II_exceptions::internals::issue_error_nothrow( \
               __FILE__, __LINE__, __PRETTY_FUNCTION__, #cond, #exc, exc); \
         }                                                                 \
-      while (0)
+      while (false)
 #  else /*ifdef DEAL_II_HAVE_BUILTIN_EXPECT*/
 #    define AssertNothrow(cond, exc)                                      \
       do                                                                  \
@@ -1684,14 +1684,14 @@ namespace deal_II_exceptions
             ::dealii::deal_II_exceptions::internals::issue_error_nothrow( \
               __FILE__, __LINE__, __PRETTY_FUNCTION__, #cond, #exc, exc); \
         }                                                                 \
-      while (0)
+      while (false)
 #  endif /*ifdef DEAL_II_HAVE_BUILTIN_EXPECT*/
 #else
 #  define AssertNothrow(cond, exc) \
     do                             \
       {                            \
       }                            \
-    while (0)
+    while (false)
 #endif
 
 /**
@@ -1736,7 +1736,7 @@ namespace deal_II_exceptions
             #exc,                                                        \
             exc);                                                        \
       }                                                                  \
-    while (0)
+    while (false)
 #else /*ifdef DEAL_II_HAVE_BUILTIN_EXPECT*/
 #  define AssertThrow(cond, exc)                                         \
     do                                                                   \
@@ -1752,7 +1752,7 @@ namespace deal_II_exceptions
             #exc,                                                        \
             exc);                                                        \
       }                                                                  \
-    while (0)
+    while (false)
 #endif /*ifdef DEAL_II_HAVE_BUILTIN_EXPECT*/
 
 
@@ -1944,7 +1944,7 @@ namespace internal
     do                               \
       {                              \
       }                              \
-    while (0)
+    while (false)
 #endif // DEAL_II_WITH_MPI
 
 #ifdef DEAL_II_WITH_CUDA
@@ -1975,7 +1975,7 @@ namespace internal
         {                          \
           (void)(error_code);      \
         }                          \
-      while (0)
+      while (false)
 #  endif
 
 /**
@@ -2004,7 +2004,7 @@ namespace internal
         {                                 \
           (void)(error_code);             \
         }                                 \
-      while (0)
+      while (false)
 #  endif
 
 /**
@@ -2033,13 +2033,13 @@ namespace internal
           local_error_code = cudaDeviceSynchronize();           \
           AssertCuda(local_error_code);                         \
         }                                                       \
-      while (0)
+      while (false)
 #  else
 #    define AssertCudaKernel() \
       do                       \
         {                      \
         }                      \
-      while (0)
+      while (false)
 #  endif
 
 /**
@@ -2072,7 +2072,7 @@ namespace internal
         {                              \
           (void)(error_code);          \
         }                              \
-      while (0)
+      while (false)
 #  endif
 
 /**
@@ -2104,7 +2104,7 @@ namespace internal
         {                                     \
           (void)(error_code);                 \
         }                                     \
-      while (0)
+      while (false)
 #  endif
 
 /**
@@ -2137,7 +2137,7 @@ namespace internal
         {                              \
           (void)(error_code);          \
         }                              \
-      while (0)
+      while (false)
 #  endif
 
 #endif
index 16ff2b720b97fa507b8300f3b615d921d46cb5c1..156dbc4cd420ba94431094a938fa06ded806b4a6 100644 (file)
@@ -37,7 +37,7 @@ DEAL_II_NAMESPACE_OPEN
         PetscErrorCode ierr = (code);                \
         AssertThrow(ierr == 0, ExcPETScError(ierr)); \
       }                                              \
-    while (0)
+    while (false)
 
 // Macro to wrap PETSc inside callbacks.
 // This is used to raise "PETSc" exceptions, i.e.
@@ -49,7 +49,7 @@ DEAL_II_NAMESPACE_OPEN
           PetscErrorCode ierr = (code); \
           CHKERRQ(ierr);                \
         }                               \
-      while (0)
+      while (false)
 #    define undefPetscCall
 #  endif
 
index 4c21dcfbc4448a7ebc8ebd271fec0802f84183bc..4146b3fe0b2fb424b209e7ad31d0c8d79ff4f49f 100644 (file)
@@ -37,7 +37,7 @@ DEAL_II_NAMESPACE_OPEN
         PetscErrorCode ierr = (code);                \
         AssertThrow(ierr == 0, ExcPETScError(ierr)); \
       }                                              \
-    while (0)
+    while (false)
 
 // Macro to wrap PETSc inside callbacks.
 // This is used to raise "PETSc" exceptions, i.e.
@@ -49,7 +49,7 @@ DEAL_II_NAMESPACE_OPEN
           PetscErrorCode ierr = (code); \
           CHKERRQ(ierr);                \
         }                               \
-      while (0)
+      while (false)
 #    define undefPetscCall
 #  endif
 
index e13fc381757dea8712c59f4faf8b6b6bdd9d26f4..e7b163e0ef881a0c9b41010dc6b081db693a3946 100644 (file)
@@ -29,7 +29,7 @@ DEAL_II_NAMESPACE_OPEN
         PetscErrorCode ierr = (code);                \
         AssertThrow(ierr == 0, ExcPETScError(ierr)); \
       }                                              \
-    while (0)
+    while (false)
 
 namespace PETScWrappers
 {
index 7a6a02893f6b21fbf413f2a314f238841d57fa29..c2e3f3a949b0268b1760bbc86cf1f7bb9849f5dc 100644 (file)
@@ -35,7 +35,7 @@
         PetscErrorCode ierr = (code);                \
         AssertThrow(ierr == 0, ExcPETScError(ierr)); \
       }                                              \
-    while (0)
+    while (false)
 
 DEAL_II_NAMESPACE_OPEN
 
index 369b285ea9a39c1bdc783bde9958044360c5e0a2..89eaa6d7b17aa2b94a2fd57caadaa147e7028b8a 100644 (file)
@@ -1103,7 +1103,7 @@ namespace PETScWrappers
           PetscErrorCode ierr = (code); \
           CHKERRQ(ierr);                \
         }                               \
-      while (0)
+      while (false)
 #  endif
 
   PetscErrorCode
index 7dc7d53cd7c6bab28d9e978665c1e69e6a52bc59..3944a275cfa037b4bebda55050b0bcd68c388c0c 100644 (file)
@@ -33,7 +33,7 @@
         PetscErrorCode ierr = (code);                \
         AssertThrow(ierr == 0, ExcPETScError(ierr)); \
       }                                              \
-    while (0)
+    while (false)
 
 DEAL_II_NAMESPACE_OPEN
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.