From 0e0c6c44d0c3a4bcdf4eb88d1a8fa539f339505f Mon Sep 17 00:00:00 2001 From: John Soo Date: Thu, 21 Apr 2022 10:02:05 -0700 Subject: [PATCH] Ignore -Wnon-virtual-dtor for static struct. --- src/nix-eval-jobs.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/nix-eval-jobs.cc b/src/nix-eval-jobs.cc index 51fb27e..32d49ef 100644 --- a/src/nix-eval-jobs.cc +++ b/src/nix-eval-jobs.cc @@ -31,6 +31,9 @@ using namespace nix; typedef enum { evalAuto, evalImpure, evalPure } pureEval; +// Safe to ignore - the args will be static. +#pragma GCC diagnostic ignored "-Wnon-virtual-dtor" +#pragma clang diagnostic ignored "-Wnon-virtual-dtor" struct MyArgs : MixEvalArgs, MixCommonArgs { Path releaseExpr; @@ -113,6 +116,8 @@ struct MyArgs : MixEvalArgs, MixCommonArgs expectArg("expr", &releaseExpr); } }; +#pragma GCC diagnostic warning "-Wnon-virtual-dtor" +#pragma clang diagnostic warning "-Wnon-virtual-dtor" static MyArgs myArgs;