From f6f97f0e4283e0927e32014674ea7d546c7ed53e Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Wed, 29 Jul 2015 16:53:31 +0200 Subject: [PATCH] Fix compilation warning: &DoFCellAccessor::get_fe() == 0 reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to true --- include/deal.II/dofs/dof_accessor.templates.h | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/include/deal.II/dofs/dof_accessor.templates.h b/include/deal.II/dofs/dof_accessor.templates.h index 01459199f3..3883cc2b29 100644 --- a/include/deal.II/dofs/dof_accessor.templates.h +++ b/include/deal.II/dofs/dof_accessor.templates.h @@ -2822,8 +2822,6 @@ namespace internal typedef dealii::DoFAccessor, level_dof_access> BaseClass; Assert (accessor.dof_handler != 0, typename BaseClass::ExcInvalidObject()); - Assert (&accessor.get_fe() != 0, - typename BaseClass::ExcInvalidObject()); Assert (static_cast(local_source_end-local_source_begin) == accessor.get_fe().dofs_per_cell, @@ -2856,8 +2854,6 @@ namespace internal typedef dealii::DoFAccessor, level_dof_access> BaseClass; Assert (accessor.dof_handler != 0, typename BaseClass::ExcInvalidObject()); - Assert (&accessor.get_fe() != 0, - typename BaseClass::ExcInvalidObject()); Assert (local_source_end-local_source_begin == accessor.get_fe().dofs_per_cell, typename BaseClass::ExcVectorDoesNotMatch()); Assert (accessor.dof_handler->n_dofs() == global_destination.size(), @@ -2889,8 +2885,6 @@ namespace internal typedef dealii::DoFAccessor, level_dof_access> BaseClass; Assert (accessor.dof_handler != 0, typename BaseClass::ExcInvalidObject()); - Assert (&accessor.get_fe() != 0, - typename BaseClass::ExcInvalidObject()); Assert (local_source_end-local_source_begin == accessor.get_fe().dofs_per_cell, typename BaseClass::ExcVectorDoesNotMatch()); Assert (accessor.dof_handler->n_dofs() == global_destination.size(), @@ -2923,8 +2917,6 @@ namespace internal typedef dealii::DoFAccessor, level_dof_access> BaseClass; Assert (accessor.dof_handler != 0, typename BaseClass::ExcInvalidObject()); - Assert (&accessor.get_fe() != 0, - typename BaseClass::ExcInvalidObject()); Assert (local_source_end-local_source_begin == accessor.get_fe().dofs_per_cell, typename BaseClass::ExcVectorDoesNotMatch()); Assert (accessor.dof_handler->n_dofs() == global_destination.size(), @@ -2955,8 +2947,6 @@ namespace internal typedef dealii::DoFAccessor, level_dof_access> BaseClass; Assert (accessor.dof_handler != 0, typename BaseClass::ExcInvalidObject()); - Assert (&accessor.get_fe() != 0, - typename BaseClass::ExcInvalidObject()); Assert (local_source.m() == accessor.get_fe().dofs_per_cell, typename BaseClass::ExcMatrixDoesNotMatch()); Assert (local_source.n() == accessor.get_fe().dofs_per_cell, @@ -2992,8 +2982,6 @@ namespace internal typedef dealii::DoFAccessor, level_dof_access> BaseClass; Assert (accessor.dof_handler != 0, typename BaseClass::ExcInvalidObject()); - Assert (&accessor.get_fe() != 0, - typename BaseClass::ExcInvalidObject()); Assert (local_source.m() == accessor.get_fe().dofs_per_cell, typename BaseClass::ExcMatrixDoesNotMatch()); Assert (local_source.n() == accessor.get_fe().dofs_per_cell, @@ -3030,8 +3018,6 @@ namespace internal typedef dealii::DoFAccessor, level_dof_access> BaseClass; Assert (accessor.dof_handler != 0, typename BaseClass::ExcInvalidObject()); - Assert (&accessor.get_fe() != 0, - typename BaseClass::ExcInvalidObject()); Assert (local_matrix.m() == accessor.get_fe().dofs_per_cell, typename BaseClass::ExcMatrixDoesNotMatch()); Assert (local_matrix.n() == accessor.get_fe().dofs_per_cell, @@ -3075,8 +3061,6 @@ namespace internal typedef dealii::DoFAccessor, level_dof_access> BaseClass; Assert (accessor.dof_handler != 0, typename BaseClass::ExcInvalidObject()); - Assert (&accessor.get_fe() != 0, - typename BaseClass::ExcInvalidObject()); Assert (local_matrix.m() == accessor.get_fe().dofs_per_cell, typename BaseClass::ExcMatrixDoesNotMatch()); Assert (local_matrix.n() == accessor.get_fe().dofs_per_cell, -- 2.39.5