# HG changeset patch # User Chris Cannam # Date 1574346527 0 # Node ID b8bf2900a47803b6d7a93af5ea0c9acec3bc77b9 # Parent 464fed3096f526b03c4d3a395ef8317f87908fe8 Avoid a compiler warning diff -r 464fed3096f5 -r b8bf2900a478 framework/Document.cpp --- a/framework/Document.cpp Thu Oct 31 11:28:35 2019 +0000 +++ b/framework/Document.cpp Thu Nov 21 14:28:47 2019 +0000 @@ -777,6 +777,12 @@ // borrowed-pointer mechanism will at least prevent memory errors, // although the other code will have to stop whatever it's doing. +// "warning: expression with side effects will be evaluated despite +// being used as an operand to 'typeid'" +#ifdef __clang__ +#pragma clang diagnostic ignored "-Wpotentially-evaluated-expression" +#endif + if (auto model = ModelById::get(modelId)) { SVCERR << "Document::releaseModel(" << modelId << "), name " << model->objectName() << ", type "