]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix compiler warnings eventually.
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Tue, 16 Aug 2011 12:51:27 +0000 (12:51 +0000)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Tue, 16 Aug 2011 12:51:27 +0000 (12:51 +0000)
git-svn-id: https://svn.dealii.org/trunk@24090 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/base/tensor_base.h
deal.II/source/fe/mapping_q1.cc

index 2aa96ab57bf5e380232ec3fb02bcc5e39f854acb..2218e8c0fd6d3891c9bc8dd1f37561c8aef43242 100644 (file)
@@ -892,7 +892,7 @@ Tensor<1,dim,Number>::Tensor (const bool initialize)
                                // Tensor::operator=(scalar) when using
                                // something like
                                // Tensor<1,dim,Tensor<1,dim,Number> >.
-    for (unsigned int i=0; i<dim; ++i)
+    for (unsigned int i=0; i!=dim; ++i)
       values[i] = Number(0);
 }
 
index e7ceb7f059c2586b204474500499082d6357aa99..d68e56654a43b1d56331647df7fbaed8483a4a42 100644 (file)
@@ -945,10 +945,11 @@ namespace internal
                    ExcDimensionMismatch(JxW_values.size(), n_q_points));
 
                                           // map the unit tangentials to the
-                                          // real cell (use int for loop to
-                                          // avoid compiler warning that
-                                          // unsigned int < 0 is always false)
-         for (int d=0; d<dim-1; ++d)
+                                          // real cell. checking for d!=dim-1
+                                          // eliminates compiler warnings
+                                          // regarding unsigned expressions <
+                                          // 0.
+         for (unsigned int d=0; d!=dim-1; ++d)
            {
              Assert (face_no+GeometryInfo<dim>::faces_per_cell*d <
                      data.unit_tangentials.size(),

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.