Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.4:Update
netgen.17640
0001-Throw-Exception-when-shape-has-invalid-typ...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-Throw-Exception-when-shape-has-invalid-type.patch of Package netgen.17640
From 54246e12ad48bc1dbd416b0b415a4a48b337c2f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de> Date: Thu, 27 Jan 2022 10:04:40 +0100 Subject: [PATCH] Throw Exception when shape has invalid type Although the switch statement handles all (current) allowed values, from a C/C++ view point the enum may have any value of its underlying type. In this case the function has no return statement and runs into undefined behavior. Fixes build failures when built with "-Werror=return-type". --- libsrc/occ/python_occ_shapes.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libsrc/occ/python_occ_shapes.cpp b/libsrc/occ/python_occ_shapes.cpp index 91e94c50..cbb35178 100644 --- a/libsrc/occ/python_occ_shapes.cpp +++ b/libsrc/occ/python_occ_shapes.cpp @@ -194,6 +194,7 @@ py::object CastShape(const TopoDS_Shape & s) case TopAbs_SHAPE: return py::cast(s); } + throw Exception("Invalid Shape type"); }; -- 2.34.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor