From bf7e6aac4a432e0586f3948b3e45bae7613cbcaf Mon Sep 17 00:00:00 2001 From: wmayer Date: Sun, 24 Jul 2022 21:39:59 +0200 Subject: [PATCH] Fix several clazy issue: * Suppress non-POD static [-Wclazy-non-pod-global-static] * Call to temporary is a no-op: [-Wclazy-writing-to-temporary] * Unused QString [-Wclazy-unused-non-trivial-variable] --- src/App/DocumentPyImp.cpp | 4 +++- src/App/PropertyLinks.cpp | 1 - src/Base/Base64.cpp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/App/DocumentPyImp.cpp b/src/App/DocumentPyImp.cpp index 40d61c94e5..94958a58f0 100644 --- a/src/App/DocumentPyImp.cpp +++ b/src/App/DocumentPyImp.cpp @@ -275,7 +275,9 @@ PyObject* DocumentPy::addObject(PyObject *args, PyObject *kwd) if (pyvp.hasAttr("__vobject__")) { pyvp.setAttr("__vobject__", pyftr.getAttr("ViewObject")); } - pyftr.getAttr("ViewObject").setAttr("Proxy", pyvp); + + Py::Object pyprx(pyftr.getAttr("ViewObject")); + pyprx.setAttr("Proxy", pyvp); return Py::new_reference_to(pyftr); } catch (Py::Exception& e) { diff --git a/src/App/PropertyLinks.cpp b/src/App/PropertyLinks.cpp index ee4abf7b6b..a511bf026e 100644 --- a/src/App/PropertyLinks.cpp +++ b/src/App/PropertyLinks.cpp @@ -2813,7 +2813,6 @@ public: tmp.swap(links); for(auto link : tmp) { auto owner = static_cast(link->getContainer()); - QString path = QString::fromUtf8(link->filePath.c_str()); // adjust file path for each PropertyXLink DocInfo::get(filename,owner->getDocument(),link,link->objectName.c_str()); } diff --git a/src/Base/Base64.cpp b/src/Base/Base64.cpp index 480592babf..eb761e1eea 100644 --- a/src/Base/Base64.cpp +++ b/src/Base/Base64.cpp @@ -32,7 +32,7 @@ #include "Base64.h" - +// clazy:excludeall=non-pod-global-static static const std::string base64_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz"