From 7d9cf631c990ceb188f16b2ef0104c163e60c8f8 Mon Sep 17 00:00:00 2001 From: "Martin D. Weinberg" Date: Tue, 15 Oct 2024 17:22:02 -0400 Subject: [PATCH] Decrease of the clang chatter; add 24.04 explicitly to the CI matrix --- .github/workflows/build.yml | 2 +- include/DiskWithHalo.H | 6 +++--- include/EXPini.H | 3 ++- include/SLGridMP2.H | 3 +++ include/massmodel.H | 6 +++--- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b2826df0f..b81c922b4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ jobs: exp: strategy: matrix: - os: [ubuntu-latest, ubuntu-22.04] + os: [ubuntu-24.04, ubuntu-22.04] cc: [gcc, clang] cxx: [g++, clang++] include: diff --git a/include/DiskWithHalo.H b/include/DiskWithHalo.H index 79e9038f7..8f96ce36d 100644 --- a/include/DiskWithHalo.H +++ b/include/DiskWithHalo.H @@ -66,13 +66,13 @@ public: dur = dur1 + dur2; } - double get_mass(const double x1, const double x2, const double x3) + double get_mass(const double x1, const double x2, const double x3) override { return get_mass(sqrt(x1*x1 + x2*x2 + x3*x3)); } - double get_density(const double x1, const double x2, const double x3) + double get_density(const double x1, const double x2, const double x3) override { return get_density(sqrt(x1*x1 + x2*x2 + x3*x3)); } - double get_pot(const double x1, const double x2, const double x3) + double get_pot(const double x1, const double x2, const double x3) override { return get_pot(sqrt(x1*x1 + x2*x2 + x3*x3)); } // Addiional member functions diff --git a/include/EXPini.H b/include/EXPini.H index b76e39ff0..79ac22e59 100644 --- a/include/EXPini.H +++ b/include/EXPini.H @@ -87,8 +87,9 @@ cxxopts::ParseResult LoadConfig(cxxopts::Options& options, { YAML::Node conf = YAML::LoadFile(config); - int count = conf.size()*2+1, cnt = 1; + const int count = conf.size()*2+1; char* data[count]; + int cnt = 1; data[0] = new char [11]; strcpy(data[0], "LoadConfig"); // Emulate the caller name diff --git a/include/SLGridMP2.H b/include/SLGridMP2.H index f83d98fe9..e521b90ef 100644 --- a/include/SLGridMP2.H +++ b/include/SLGridMP2.H @@ -314,6 +314,9 @@ private: //! Constructor CoordMap(double H) : H(H) {} + //! Destructor + virtual ~CoordMap() {} + //! Convert from vertical to mapped coordinate virtual double z_to_xi (double z) = 0; diff --git a/include/massmodel.H b/include/massmodel.H index a91af5a8e..88939322d 100644 --- a/include/massmodel.H +++ b/include/massmodel.H @@ -188,13 +188,13 @@ public: virtual double get_dpot2(const double) = 0; virtual void get_pot_dpot(const double, double&, double&) = 0; - double get_mass(const double x1, const double x2, const double x3) + double get_mass(const double x1, const double x2, const double x3) override { return get_mass(sqrt(x1*x1 + x2*x2 + x3*x3)); } - double get_density(const double x1, const double x2, const double x3) + double get_density(const double x1, const double x2, const double x3) override { return get_density(sqrt(x1*x1 + x2*x2 + x3*x3)); } - double get_pot(const double x1, const double x2, const double x3) + double get_pot(const double x1, const double x2, const double x3) override { return get_pot(sqrt(x1*x1 + x2*x2 + x3*x3)); } //@}