aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/generator/shiboken/cppgenerator.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2022-11-28 11:28:04 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2022-11-30 16:00:15 +0100
commita997326ff9beef12bb0f99d057cd5a48a7f4549b (patch)
treed68575e2d081aed5e3f235c189969e138d2b8375 /sources/shiboken6/generator/shiboken/cppgenerator.h
parent74b22de599be394f52280e59423f63f78159fa87 (diff)
shiboken6: Fix warning about nonreachable code in generated rich comparison
Remove the generated goto after the return from rich comparison. As this introduces a new warning about the then unused error label, write the error label only when needed. Amends c7904338f8707a30c70f1ddf62ec740cae255f36. Spotted in WASM builds which uses -Wunreachable-code. Task-number: PYSIDE-74 Pick-to: 6.4 6.2 5.15 Change-Id: I293aee5b28631c0127a7de197812d77504a61e24 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'sources/shiboken6/generator/shiboken/cppgenerator.h')
-rw-r--r--sources/shiboken6/generator/shiboken/cppgenerator.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sources/shiboken6/generator/shiboken/cppgenerator.h b/sources/shiboken6/generator/shiboken/cppgenerator.h
index b2e99b7bb..f16f5cce4 100644
--- a/sources/shiboken6/generator/shiboken/cppgenerator.h
+++ b/sources/shiboken6/generator/shiboken/cppgenerator.h
@@ -427,7 +427,8 @@ private:
const QString &baseName,
const GeneratorContext &context) const;
static void writeRichCompareFunctionFooter(TextStream &s,
- const QString &baseName);
+ const QString &baseName,
+ bool writeLabel);
void writeRichCompareFunction(TextStream &s, const GeneratorContext &context) const;
void writeSmartPointerRichCompareFunction(TextStream &s, const GeneratorContext &context) const;