From efca7105c7576cf090cf0b3460d47bb703e368e2 Mon Sep 17 00:00:00 2001 From: John Soo Date: Mon, 25 Apr 2022 08:53:17 -0700 Subject: [PATCH] Silence more harmless warnings. --- src/nix-eval-jobs.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/nix-eval-jobs.cc b/src/nix-eval-jobs.cc index b03fa93..8ffd036 100644 --- a/src/nix-eval-jobs.cc +++ b/src/nix-eval-jobs.cc @@ -33,8 +33,11 @@ using namespace nlohmann; typedef enum { evalAuto, evalImpure, evalPure } pureEval; // Safe to ignore - the args will be static. +#ifdef __GNUC__ #pragma GCC diagnostic ignored "-Wnon-virtual-dtor" +#elif __clang__ #pragma clang diagnostic ignored "-Wnon-virtual-dtor" +#endif struct MyArgs : MixEvalArgs, MixCommonArgs { Path releaseExpr; Path gcRootsDir; @@ -101,8 +104,11 @@ struct MyArgs : MixEvalArgs, MixCommonArgs { expectArg("expr", &releaseExpr); } }; -#pragma GCC diagnostic warning "-Wnon-virtual-dtor" -#pragma clang diagnostic warning "-Wnon-virtual-dtor" +#ifdef __GNUC__ +#pragma GCC diagnostic ignored "-Wnon-virtual-dtor" +#elif __clang__ +#pragma clang diagnostic ignored "-Wnon-virtual-dtor" +#endif static MyArgs myArgs;