MINGW-packages/mingw-w64-opencascade/0012-Avoid-invalid-conversion-error.patch
Markus Mützel 81a82934e7 opencascade: update to 7.8.1
Refresh patches for new version.
Remove patch that is no longer needed.
Add patch to avoid error for invalid conversion of pointer types.
Avoid issue with circular dependency between OpenCASCADE and VTK.
The Tk and Tcl packages don't install static libraries.
2024-10-26 22:57:17 +02:00

37 lines
2.9 KiB
Diff

From 42401d20186a00701dbd18edd4cec1abc7cc64ee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Markus=20M=C3=BCtzel?= <markus.muetzel@gmx.de>
Date: Thu, 24 Oct 2024 12:44:41 +0200
Subject: [PATCH] Avoid invalid conversion error.
Fixes:
```
FAILED: src/TKV3d/CMakeFiles/TKV3d.dir/__/StdPrs/StdPrs_BRepFont.cxx.obj
C:\msys64\mingw64\bin\g++.exe -DHAVE_D3D -DHAVE_FFMPEG -DHAVE_FREEIMAGE -DHAVE_FREETYPE -DHAVE_OPENGL -DHAVE_OPENGL_EXT -DHAVE_OPENVR -DHAVE_RAPIDJSON -DHAVE_TBB -DHAVE_TK -DHAVE_VTK -DOCC_CONVERT_SIGNALS -DOPENVR_BUILD_STATIC -DUNICODE -DVTK_OPENGL2_BACKEND -D_UNICODE -D_WIN32_WINNT=0x0601 -IC:/msys64/mingw64/include/freetype2 -IC:/msys64/mingw64/include/vtk -IC:/msys64/mingw64/include/ffmpeg4.4 -ID:/repo/MSYS2/MINGW-packages/mingw-w64-opencascade/src/build-MINGW64-static/include/opencascade -march=nocona -msahf -mtune=generic -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -Wp,-D__USE_MINGW_ANSI_STDIO=1 -fexceptions -fPIC -Wall -Wextra -O3 -DNDEBUG -s -DNo_Exception -std=gnu++11 -DOCCT_NO_PLUGINS -DOCCT_STATIC_BUILD -D__V3d_DLL -D__Select3D_DLL -D__Prs3d_DLL -D__StdPrs_DLL -D__SelectBasics_DLL -D__SelectMgr_DLL -D__PrsMgr_DLL -D__AIS_DLL -D__StdSelect_DLL -D__DsgPrs_DLL -D__PrsDim_DLL -MD -MT src/TKV3d/CMakeFiles/TKV3d.dir/__/StdPrs/StdPrs_BRepFont.cxx.obj -MF src\TKV3d\CMakeFiles\TKV3d.dir\__\StdPrs\StdPrs_BRepFont.cxx.obj.d -o src/TKV3d/CMakeFiles/TKV3d.dir/__/StdPrs/StdPrs_BRepFont.cxx.obj -c D:/repo/MSYS2/MINGW-packages/mingw-w64-opencascade/src/occt-V7_8_1/src/StdPrs/StdPrs_BRepFont.cxx
D:/repo/MSYS2/MINGW-packages/mingw-w64-opencascade/src/occt-V7_8_1/src/StdPrs/StdPrs_BRepFont.cxx: In member function 'Standard_Boolean StdPrs_BRepFont::renderGlyph(Standard_Utf32Char, TopoDS_Shape&)':
D:/repo/MSYS2/MINGW-packages/mingw-w64-opencascade/src/occt-V7_8_1/src/StdPrs/StdPrs_BRepFont.cxx:460:30: error: invalid conversion from 'unsigned char*' to 'const char*' [-fpermissive]
460 | const char* aTags = &anOutline->tags[aStartIndex];
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| unsigned char*
```
---
src/StdPrs/StdPrs_BRepFont.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/StdPrs/StdPrs_BRepFont.cxx b/src/StdPrs/StdPrs_BRepFont.cxx
index ab2d9b3c9f..51ca6be839 100644
--- a/src/StdPrs/StdPrs_BRepFont.cxx
+++ b/src/StdPrs/StdPrs_BRepFont.cxx
@@ -457,7 +457,7 @@ Standard_Boolean StdPrs_BRepFont::renderGlyph (const Standard_Utf32Char theChar,
for (short aContour = 0, aStartIndex = 0; aContour < anOutline->n_contours; ++aContour)
{
const FT_Vector* aPntList = &anOutline->points[aStartIndex];
- const char* aTags = &anOutline->tags[aStartIndex];
+ const char* aTags = reinterpret_cast<const char*>(&anOutline->tags[aStartIndex]);
const short anEndIndex = anOutline->contours[aContour];
const short aPntsNb = (anEndIndex - aStartIndex) + 1;
aStartIndex = anEndIndex + 1;
--
2.44.0.windows.1