aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/xmlutils.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2024-06-17 17:31:23 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2024-06-24 10:36:07 +0200
commit8f85650fe8066c5903e865aedb3d92d863243996 (patch)
treeefdef02a00572d16a46f5309fc30b7ce0408bea7 /sources/shiboken6/ApiExtractor/xmlutils.cpp
parent12e370d38ab0f88c6ae555793ed5ac6a18343255 (diff)
shiboken6: Fix static analysis warnings
- Initialize variables - Use auto * - Use const references to prevent copies - Remove const from function returns - Remove repeated return types - Fix else after return/throw - Make functions const/static where appropriate - Add missing override - Fix some invocations of static methods - Fix some int types (qsizetype) to avoid lossy conversions - Minor cleanups - Remove some macros Change-Id: I414b8451703b136f135383289de49e743e84fb3a Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/xmlutils.cpp')
-rw-r--r--sources/shiboken6/ApiExtractor/xmlutils.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/sources/shiboken6/ApiExtractor/xmlutils.cpp b/sources/shiboken6/ApiExtractor/xmlutils.cpp
index ccacd4ce7..104cca1fe 100644
--- a/sources/shiboken6/ApiExtractor/xmlutils.cpp
+++ b/sources/shiboken6/ApiExtractor/xmlutils.cpp
@@ -26,8 +26,9 @@ std::shared_ptr<XQuery> XQuery::create(const QString &focus, QString *errorMessa
#if defined(HAVE_LIBXSLT)
return libXml_createXQuery(focus, errorMessage);
#else
+ Q_UNUSED(focus);
*errorMessage = QLatin1StringView(__FUNCTION__) + u" is not implemented."_s;
- return std::shared_ptr<XQuery>();
+ return {};
#endif
}
@@ -36,6 +37,7 @@ QString xsl_transform(const QString &xml, const QString &xsl, QString *errorMess
#if defined(HAVE_LIBXSLT)
return libXslt_transform(xml, xsl, errorMessage);
#else
+ Q_UNUSED(xsl);
*errorMessage = QLatin1StringView(__FUNCTION__) + u" is not implemented."_s;
return xml;
#endif