New package OBS-URL: https://build.opensuse.org/request/show/973796 OBS-URL: https://build.opensuse.org/package/show/science/MiniZincIDE?expand=0&rev=1
44 lines
1.7 KiB
Diff
44 lines
1.7 KiB
Diff
From f4af407fc63ecc411ddf744b0864287ac21fa1f3 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
|
Date: Fri, 29 Apr 2022 03:48:44 +0200
|
|
Subject: [PATCH] Fix missing return statement
|
|
|
|
Although the switch handles all semantically valid values, the C++ enum is
|
|
not closed and can take any value of its underlying type.
|
|
|
|
Fixes GCC diagnostic message/error:
|
|
"error: control reaches end of non-void function [-Werror=return-type]"
|
|
---
|
|
MiniZincIDE/configwindow.cpp | 1 +
|
|
cp-profiler/src/cpprofiler/analysis/similar_subtree_window.cpp | 2 ++
|
|
2 files changed, 3 insertions(+)
|
|
|
|
diff --git a/MiniZincIDE/configwindow.cpp b/MiniZincIDE/configwindow.cpp
|
|
index ad27cdf..6192407 100644
|
|
--- a/MiniZincIDE/configwindow.cpp
|
|
+++ b/MiniZincIDE/configwindow.cpp
|
|
@@ -819,6 +819,7 @@ QWidget* ExtraOptionDelegate::createEditor(QWidget* parent, const QStyleOptionVi
|
|
case SolverFlag::T_STRING:
|
|
return QStyledItemDelegate::createEditor(parent, option, index);
|
|
}
|
|
+ return nullptr;
|
|
} else if (index.data().type() == QVariant::Double) {
|
|
auto field = new QLineEdit(parent);
|
|
field->setAlignment(Qt::AlignRight);
|
|
diff --git a/cp-profiler/src/cpprofiler/analysis/similar_subtree_window.cpp b/cp-profiler/src/cpprofiler/analysis/similar_subtree_window.cpp
|
|
index 36e9a6c..4065a83 100644
|
|
--- a/cp-profiler/src/cpprofiler/analysis/similar_subtree_window.cpp
|
|
+++ b/cp-profiler/src/cpprofiler/analysis/similar_subtree_window.cpp
|
|
@@ -81,6 +81,8 @@ static QString prop2str(PatternProp prop)
|
|
case PatternProp::SIZE:
|
|
return "size";
|
|
}
|
|
+ print("Error:: invalid property.");
|
|
+ return "<invalid_property>";
|
|
}
|
|
|
|
void SimilarSubtreeWindow::initInterface()
|
|
--
|
|
2.36.0
|
|
|