Merge pull request #53 from jsoo1/silence-irrelevant-warnings

Ignore -Wnon-virtual-dtor for static struct.
This commit is contained in:
adisbladis 2022-04-22 13:51:36 +07:00 committed by GitHub
commit a07a22f94c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -31,6 +31,9 @@ using namespace nix;
typedef enum { evalAuto, evalImpure, evalPure } pureEval; 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 struct MyArgs : MixEvalArgs, MixCommonArgs
{ {
Path releaseExpr; Path releaseExpr;
@ -113,6 +116,8 @@ struct MyArgs : MixEvalArgs, MixCommonArgs
expectArg("expr", &releaseExpr); expectArg("expr", &releaseExpr);
} }
}; };
#pragma GCC diagnostic warning "-Wnon-virtual-dtor"
#pragma clang diagnostic warning "-Wnon-virtual-dtor"
static MyArgs myArgs; static MyArgs myArgs;