Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
OpenVolumeMesh
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
6
Issues
6
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenVolumeMesh
OpenVolumeMesh
Commits
3cf0d296
Commit
3cf0d296
authored
May 29, 2019
by
Jan Möbius
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'warnings' into 'master'
More work on compiler warnings See merge request
!64
parents
c373d3ef
6f29b77c
Pipeline
#10646
passed with stage
in 9 minutes and 58 seconds
Changes
13
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
32 additions
and
25 deletions
+32
-25
.gitignore
.gitignore
+5
-0
cmake/ACGCompiler.cmake
cmake/ACGCompiler.cmake
+13
-6
src/OpenVolumeMesh/Core/OpenVolumeMeshHandle.hh
src/OpenVolumeMesh/Core/OpenVolumeMeshHandle.hh
+1
-1
src/OpenVolumeMesh/Core/OpenVolumeMeshProperty.hh
src/OpenVolumeMesh/Core/OpenVolumeMeshProperty.hh
+1
-1
src/OpenVolumeMesh/Core/TopologyKernel.hh
src/OpenVolumeMesh/Core/TopologyKernel.hh
+1
-0
src/OpenVolumeMesh/Mesh/HexahedralMeshTopologyKernel.hh
src/OpenVolumeMesh/Mesh/HexahedralMeshTopologyKernel.hh
+1
-1
src/Unittests/unittests.cc
src/Unittests/unittests.cc
+1
-5
src/Unittests/unittests_basics.cc
src/Unittests/unittests_basics.cc
+1
-2
src/Unittests/unittests_common.hh
src/Unittests/unittests_common.hh
+5
-2
src/Unittests/unittests_files.cc
src/Unittests/unittests_files.cc
+1
-2
src/Unittests/unittests_iterators.cc
src/Unittests/unittests_iterators.cc
+1
-2
src/Unittests/unittests_properties.cc
src/Unittests/unittests_properties.cc
+0
-2
src/Unittests/unittests_smartptr.cc
src/Unittests/unittests_smartptr.cc
+1
-1
No files found.
.gitignore
View file @
3cf0d296
...
...
@@ -6,3 +6,8 @@ build*
.settings
cppcheck.log
# gcov output files:
*.gcda
*.gcno
cmake/ACGCompiler.cmake
View file @
3cf0d296
...
...
@@ -46,14 +46,10 @@ if (UNIX)
# Warnings
################################################################################
IF
(
NOT CMAKE_SYSTEM MATCHES
"SunOS*"
)
list
(
APPEND ADDITIONAL_CXX_FLAGS
"-W"
"-Wall"
"-Wno-unused"
)
list
(
APPEND ADDITIONAL_C_FLAGS
"-W"
"-Wall"
"-Wno-unused"
)
ENDIF
()
if
(
"
${
CMAKE_CXX_COMPILER
}
"
MATCHES
".*clang.*"
)
if
(
"
${
CMAKE_CXX_COMPILER_ID
}
"
MATCHES
"Clang"
)
list
(
APPEND ADDITIONAL_CXX_FLAGS
"-Weverything"
)
list
(
APPEND ADDITIONAL_CXX_FLAGS
"-Wno-c++98-compat"
)
list
(
APPEND ADDITIONAL_CXX_FLAGS
"-Wno-c++98-compat-pedantic"
)
list
(
APPEND ADDITIONAL_CXX_FLAGS
"-Wno-padded"
)
list
(
APPEND ADDITIONAL_CXX_FLAGS
"-Wno-old-style-cast"
)
list
(
APPEND ADDITIONAL_CXX_FLAGS
"-Wno-documentation-unknown-command"
)
...
...
@@ -63,6 +59,17 @@ if (UNIX)
list
(
APPEND ADDITIONAL_CXX_FLAGS
"-Wno-deprecated"
)
list
(
APPEND ADDITIONAL_CXX_FLAGS
"-Wno-weak-vtables"
)
endif
()
if
(
"
${
CMAKE_CXX_COMPILER_ID
}
"
MATCHES
"GNU"
)
list
(
APPEND ADDITIONAL_CXX_FLAGS
"-Wall"
)
list
(
APPEND ADDITIONAL_CXX_FLAGS
"-Wextra"
)
list
(
APPEND ADDITIONAL_CXX_FLAGS
"-Wpedantic"
)
list
(
APPEND ADDITIONAL_CXX_FLAGS
"-Wshadow"
)
list
(
APPEND ADDITIONAL_CXX_FLAGS
"-Wpointer-arith"
)
list
(
APPEND ADDITIONAL_CXX_FLAGS
"-Wcast-qual"
)
list
(
APPEND ADDITIONAL_CXX_FLAGS
"-Wconversion"
)
list
(
APPEND ADDITIONAL_CXX_FLAGS
"-Wtype-limits"
)
list
(
APPEND ADDITIONAL_CXX_FLAGS
"-Wsign-compare"
)
endif
()
################################################################################
# STL Vector checks
...
...
src/OpenVolumeMesh/Core/OpenVolumeMeshHandle.hh
View file @
3cf0d296
...
...
@@ -112,7 +112,7 @@ public:
static
HandleT
<
EntityTag
>
from_unsigned
(
size_t
_idx
)
{
if
(
_idx
<=
st
d
::
numeric_limits
<
int
>::
max
(
))
{
if
(
_idx
<=
st
atic_cast
<
size_t
>
(
std
::
numeric_limits
<
int
>::
max
()
))
{
return
HandleT
<
EntityTag
>
(
static_cast
<
int
>
(
_idx
));
}
else
{
assert
(
false
);
...
...
src/OpenVolumeMesh/Core/OpenVolumeMeshProperty.hh
View file @
3cf0d296
...
...
@@ -238,7 +238,7 @@ inline void OpenVolumeMeshPropertyT<bool>::swap(size_t _i0, size_t _i1)
auto
tmp
=
data_
[
_i0
];
data_
[
_i0
]
=
data_
[
_i1
];
data_
[
_i1
]
=
tmp
;
;
data_
[
_i1
]
=
tmp
;
}
template
<>
...
...
src/OpenVolumeMesh/Core/TopologyKernel.hh
View file @
3cf0d296
...
...
@@ -55,6 +55,7 @@ public:
TopologyKernel
&
operator
=
(
const
TopologyKernel
&
)
=
default
;
void
assign
(
const
TopologyKernel
*
other
)
{
assert
(
other
!=
nullptr
);
*
this
=
*
other
;
}
...
...
src/OpenVolumeMesh/Mesh/HexahedralMeshTopologyKernel.hh
View file @
3cf0d296
...
...
@@ -88,7 +88,7 @@ public:
static
const
unsigned
char
INVALID
=
6
;
static
inline
unsigned
char
opposite_orientation
(
const
unsigned
char
_d
)
{
return
(
_d
%
2
==
0
?
_d
+
1
:
_d
-
1
);
return
static_cast
<
unsigned
char
>
(
_d
%
2
==
0
?
_d
+
1
:
_d
-
1
);
}
// Constructor
...
...
src/Unittests/unittests.cc
View file @
3cf0d296
#include <gtest/gtest.h>
#ifdef __clang__
# pragma GCC diagnostic ignored "-Weverything"
#endif
#include "unittests_common.hh"
int
main
(
int
_argc
,
char
**
_argv
)
{
...
...
src/Unittests/unittests_basics.cc
View file @
3cf0d296
#include <gtest/gtest.h>
#include <Unittests/unittests_common.hh>
#include "unittests_common.hh"
#include <OpenVolumeMesh/Attribs/StatusAttrib.hh>
#include <OpenVolumeMesh/Attribs/NormalAttrib.hh>
...
...
src/Unittests/unittests_common.hh
View file @
3cf0d296
#ifndef INCLUDE_UNITTESTS_COMMON_HH
#define INCLUDE_UNITTESTS_COMMON_HH
#include <gtest/gtest.h>
#include <OpenVolumeMesh/Mesh/PolyhedralMesh.hh>
#include <OpenVolumeMesh/Mesh/HexahedralMesh.hh>
...
...
@@ -9,11 +8,15 @@
#include <OpenVolumeMesh/Geometry/VectorT.hh>
#ifdef __clang__
# pragma GCC diagnostic ignored "-Weverything"
# pragma GCC diagnostic ignored "-Wundef"
# pragma GCC diagnostic ignored "-Wglobal-constructors"
# pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
# pragma GCC diagnostic ignored "-W
undef
"
# pragma GCC diagnostic ignored "-W
missing-noreturn
"
#endif
#include <gtest/gtest.h>
#define EXPECT_HANDLE_EQ(a, b) EXPECT_EQ((a).idx(), (b).idx())
#define EXPECT_HANDLE_NE(a, b) EXPECT_NE((a).idx(), (b).idx())
...
...
src/Unittests/unittests_files.cc
View file @
3cf0d296
#include <gtest/gtest.h>
#include <Unittests/unittests_common.hh>
#include "unittests_common.hh"
#include <OpenVolumeMesh/FileManager/FileManager.hh>
...
...
src/Unittests/unittests_iterators.cc
View file @
3cf0d296
#include
<gtest/gtest.h>
#include
"unittests_common.hh"
#include <Unittests/unittests_common.hh>
using
namespace
OpenVolumeMesh
;
...
...
src/Unittests/unittests_properties.cc
View file @
3cf0d296
#include <iostream>
#include <gtest/gtest.h>
#include "unittests_common.hh"
#include <OpenVolumeMesh/Attribs/StatusAttrib.hh>
...
...
src/Unittests/unittests_smartptr.cc
View file @
3cf0d296
#include
<gtest/gtest.h>
#include
"unittests_common.hh"
#if __cplusplus >= 201103L || _MSC_VER >= 1800
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment