]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid a few compiler warnings.
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Wed, 10 Nov 2010 15:35:22 +0000 (15:35 +0000)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Wed, 10 Nov 2010 15:35:22 +0000 (15:35 +0000)
git-svn-id: https://svn.dealii.org/trunk@22678 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/base/tensor_product_polynomials.h
deal.II/include/deal.II/base/utilities.h
deal.II/source/fe/fe_abf.cc

index db503e098b10ab60ec1edc4b76c41c331ac6346b..cdce04cbfac7df8a54290b26118aa880e463f902 100644 (file)
@@ -529,7 +529,7 @@ TensorProductPolynomials<dim>::
 x_to_the_dim (const unsigned int x)
 {
   unsigned int y = 1;
-  for (unsigned int d=0; d<dim; ++d)
+  for (int d=0; d<dim; ++d)
     y *= x;
   return y;
 }
index 72ece1e8a70ab2f0e4c0a06f135e82cd252939c9..6d8c067a0dda6352c1b37ad8f691c1cfff0708db 100644 (file)
@@ -659,6 +659,8 @@ namespace Utilities
     Assert (N>0, ExcNotImplemented());
     switch (N)
       {
+        case 0:
+             return 1;
        case 1:
              return n;
        case 2:
@@ -668,8 +670,8 @@ namespace Utilities
        case 4:
              return n*n*n*n;
        default:
-             T result = n;
-             for (unsigned int d=1;d<N;++d)
+             T result = 1;
+             for (int d=0;d<N;++d)
                result *= n;
              return result;
       }
index 6c14d14e8fe787ec57993aef3af15b592f58abab..b3aadd6e0ab82504815a8cdb9b69f010fd1c9622 100644 (file)
@@ -456,7 +456,7 @@ FE_ABF<dim>::get_dpo_vector (const unsigned int rt_order)
                                    // Initiative...), and we have
                                    // (rt_order+1)^(dim-1) DoFs per face
   unsigned int dofs_per_face = 1;
-  for (unsigned int d=0; d<dim-1; ++d)
+  for (int d=0; d<dim-1; ++d)
     dofs_per_face *= rt_order+1;
 
                                    // and then there are interior dofs

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.