COMP: adjustments for nvc++ compiler

- remove unneeded -Wno-old-style flags with boost/cgal elements
- add nvc equivalent to gcc/clang -Wno-invalid-offsetof
- avoid warnings about set-but-unused variable and change of scoping

STYLE: remove wmake 'CGAL' rule
- was a transitional forward to 'cgal' rule since DEC-2020
This commit is contained in:
Mark Olesen 2025-01-24 10:44:57 +00:00
parent c987ac228c
commit 297fee00f1
7 changed files with 8 additions and 15 deletions

View File

@ -4,7 +4,6 @@ include $(GENERAL_RULES)/cgal
EXE_INC = \
-DUNIX \
-Wno-old-style-cast \
/* -IMarchingCubes */ \
-I$(FASTDUALOCTREE_SRC_PATH) \
-I../conformalVoronoiMesh/lnInclude \

View File

@ -1,7 +1,6 @@
include $(GENERAL_RULES)/cgal-header-only
EXE_INC = \
-Wno-old-style-cast \
$(COMP_FLAGS) \
${CGAL_INC} \
-I$(LIB_SRC)/finiteVolume/lnInclude \
@ -9,7 +8,6 @@ EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/parallel/distributed/lnInclude
EXE_LIBS = \
-lfiniteVolume \
-lsurfMesh \

View File

@ -1,8 +1,6 @@
EXE_NDEBUG = -DNDEBUG
/* EXE_NDEBUG = -g -O0 -DFULLDEBUG */
c++CGALWARN = -Wno-old-style-cast
/*-- Define CGAL_INEXACT to use inexact CGAL constructions */
include $(GENERAL_RULES)/cgal
@ -11,7 +9,6 @@ EXE_INC = \
${ROUNDING_MATH} \
${EXE_NDEBUG} \
${CGAL_INC} \
${c++LESSWARN} \
-I.. \
-I$(LIB_SRC)/surfMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2019-2023 OpenCFD Ltd.
Copyright (C) 2019-2025 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -64,12 +64,11 @@ std::string pipeOpen(const std::string& cmd, const int lineNum = 0)
if (cnt == lineNum)
{
// Retain the last line, trimming trailing newline
str.assign(buf);
if (str.size())
if (nread > 0)
{
str.resize(str.size()-1);
buf[nread-1] = '\0';
}
str.assign(buf);
}
}

View File

@ -521,7 +521,7 @@ void Foam::displacementSmartPointSmoothingMotionSolver::solve()
markAffectedFaces(facesToMove_, affectedFaces);
for(label i = 0; i < nPointSmootherIter_; i ++)
for (label nIter = 0; nIter < nPointSmootherIter_; ++nIter)
{
const pointField wantedPoints
(
@ -665,7 +665,7 @@ void Foam::displacementSmartPointSmoothingMotionSolver::solve()
if (debug & 2)
{
OBJstream os(debugDir/"untangle_" + Foam::name(i) + ".obj");
OBJstream os(debugDir/"untangle_" + Foam::name(nIter) + ".obj");
const pointField wantedPoints
(

View File

@ -1 +0,0 @@
include $(GENERAL_RULES)/cgal

View File

@ -12,7 +12,7 @@ ptFLAGS := -DNoRepository
c++WARN = \
-Wall -Wextra \
--diag_suppress=111,128,177,185,612,998,1098 \
--diag_suppress=111,128,177,185,612,998,1098,1428 \
--display_error_number
# Less restrictive warnings (eg, for flex++, CGAL, etc.)
@ -34,5 +34,6 @@ sinclude $(GENERAL_RULES)/common/c++$(WM_COMPILE_OPTION)
#612-D: overloaded virtual function ... is only partially overridden
#998-D: function XX is hidden by YY -- virtual function override intended?
#1098-D: unknown attribute "fallthrough"
#1428-D: [offset_in_non_POD_nonstandard]
#
#------------------------------------------------------------------------------