From: David Wells Date: Sat, 14 May 2022 18:12:09 +0000 (-0400) Subject: Fix some GCC-12 warnings. X-Git-Tag: v9.4.0-rc1~216^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68d7d1a4d964396c77b02661ca81696c885e8545;p=dealii.git Fix some GCC-12 warnings. --- diff --git a/include/deal.II/base/config.h.in b/include/deal.II/base/config.h.in index aff1915bcb..4ab74a0df4 100644 --- a/include/deal.II/base/config.h.in +++ b/include/deal.II/base/config.h.in @@ -463,6 +463,7 @@ _Pragma("GCC diagnostic ignored \"-Wunused-function\"") \ _Pragma("GCC diagnostic ignored \"-Wunused-parameter\"") \ _Pragma("GCC diagnostic ignored \"-Wunused-private-field\"") \ _Pragma("GCC diagnostic ignored \"-Wunused-variable\"") \ +_Pragma("GCC diagnostic ignored \"-Wuse-after-free\"") \ _Pragma("GCC diagnostic warning \"-Wpragmas\"") /*!*/ # define DEAL_II_ENABLE_EXTRA_DIAGNOSTICS \ diff --git a/source/fe/fe_rt_bubbles.cc b/source/fe/fe_rt_bubbles.cc index bd3b3ce960..14d9a36be8 100644 --- a/source/fe/fe_rt_bubbles.cc +++ b/source/fe/fe_rt_bubbles.cc @@ -208,8 +208,11 @@ FE_RT_Bubbles::initialize_support_points(const unsigned int deg) // one for each direction QGaussLobatto<1> high(deg + 1); std::vector> pts = high.get_points(); - pts.erase(pts.begin()); - pts.erase(pts.end() - 1); + if (pts.size() > 2) + { + pts.erase(pts.begin()); + pts.erase(pts.end() - 1); + } std::vector wts(pts.size(), 1); Quadrature<1> low(pts, wts);