fix warnings

This commit is contained in:
Joachim Schoeberl 2023-07-25 23:03:58 +02:00
parent 0752aa7def
commit d429540a47
4 changed files with 10 additions and 4 deletions

View File

@ -343,7 +343,7 @@ namespace netgen
const Point3d p = Center (p1, p2); const Point3d p = Center (p1, p2);
glRasterPos3d (p.X(), p.Y(), p.Z()); glRasterPos3d (p.X(), p.Y(), p.Z());
sprintf (buf, "%d", seg.edgenr); snprintf (buf, sizeof(buf), "%d", seg.edgenr);
// glCallLists (GLsizei(strlen (buf)), GL_UNSIGNED_BYTE, buf); // glCallLists (GLsizei(strlen (buf)), GL_UNSIGNED_BYTE, buf);
MyOpenGLText (buf); MyOpenGLText (buf);
} }
@ -418,7 +418,7 @@ namespace netgen
const Point3d & p = mesh->Point(i); const Point3d & p = mesh->Point(i);
glRasterPos3d (p.X(), p.Y(), p.Z()); glRasterPos3d (p.X(), p.Y(), p.Z());
sprintf (buf, "%d", int(i)); snprintf (buf, sizeof(buf), "%d", int(i));
// glCallLists (GLsizei(strlen (buf)), GL_UNSIGNED_BYTE, buf); // glCallLists (GLsizei(strlen (buf)), GL_UNSIGNED_BYTE, buf);
MyOpenGLText (buf); MyOpenGLText (buf);
} }

View File

@ -2228,7 +2228,7 @@ namespace netgen
void MeshTopology :: GetFaceEdges (int fnr, NgArray<int> & fedges, bool withorientation) const void MeshTopology :: GetFaceEdges (int fnr, NgArray<int> & fedges, bool withorientation) const
{ {
NgArrayMem<int,4> pi(4); NgArrayMem<int,4> pi(4);
NgArrayMem<int,12> eledges; // NgArrayMem<int,12> eledges;
fedges.SetSize (0); fedges.SetSize (0);
GetFaceVertices(fnr, pi); GetFaceVertices(fnr, pi);
@ -2279,7 +2279,8 @@ namespace netgen
{ {
const ELEMENT_EDGE * fa_ref_edges = GetEdges1 (GetFaceType(fnr)); const ELEMENT_EDGE * fa_ref_edges = GetEdges1 (GetFaceType(fnr));
fedges.SetSize(nfa_ref_edges); fedges.SetSize(nfa_ref_edges);
GetElementEdges (els[i]+1, eledges); // GetElementEdges (els[i]+1, eledges);
auto eledges = GetEdges (els[i]);
for (int j = 0; j < eledges.Size(); j++) for (int j = 0; j < eledges.Size(); j++)
{ {

View File

@ -22,6 +22,8 @@
# endif # endif
#endif #endif
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#define USE_TOGL_STUB_PROCS #define USE_TOGL_STUB_PROCS
#include "togl.h" #include "togl.h"

View File

@ -10,6 +10,9 @@
* See the LICENSE file for copyright details. * See the LICENSE file for copyright details.
*/ */
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#include "togl.h" #include "togl.h"
#if defined(TOGL_OSMESA) || defined(TOGL_WGL) #if defined(TOGL_OSMESA) || defined(TOGL_WGL)