Commit 10ec6d30 authored by Alexander Bock's avatar Alexander Bock
Browse files

Revert pragma warnings

parent 068013be
Showing with 40 additions and 14 deletions
+40 -14
Subproject commit 3d9a9cb428154398d8c2b8b1fafca600d3aff075
Subproject commit 4e00462a08d5a38eb71a31a2e2f9ed4c7de72c45
Subproject commit 359aefa702be74f6bbc1535594c2b12e41a94b49
Subproject commit 5d45aa76aa3e6b2eba42638679fc5526574c97e4
......@@ -30,13 +30,17 @@
#pragma warning (disable : 4706) // assignment within conditional expression
#endif // WIN32
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
#pragma GCC diagnostic ignored "-Wuseless-cast"
#endif // __GNUC__
#include <json/json.hpp>
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic pop
#endif // __GNUC__
#ifdef WIN32
#pragma warning (pop)
......
......@@ -36,17 +36,22 @@
#include <vector>
#include <set>
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wold-style-cast"
#elif defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wold-style-cast"
#endif
#include "SpiceUsr.h"
#include "SpiceZpr.h"
#ifdef __clang__
#pragma clang diagnostic pop
#elif defined(__GNUC__)
#pragma GCC diagnostic pop
#endif
namespace openspace {
......
......@@ -25,17 +25,22 @@
#ifndef __OPENSPACE_MODULE_TOUCH___TUIO_EAR___H__
#define __OPENSPACE_MODULE_TOUCH___TUIO_EAR___H__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wold-style-cast"
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wold-style-cast"
#elif defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wold-style-cast"
#endif
#include <modules/touch/ext/libTUIO11/TUIO/TuioListener.h>
#include <modules/touch/ext/libTUIO11/TUIO/TuioClient.h>
#pragma GCC diagnostic pop
#ifdef __clang__
#pragma clang diagnostic pop
#elif defined(__GNUC__)
#pragma GCC diagnostic pop
#endif
#include <openspace/util/touch.h>
#include <ghoul/glm.h>
......
......@@ -1026,11 +1026,13 @@ void SpiceManager::findCkCoverage(const std::string& path) {
constexpr unsigned int MaxObj = 1024;
constexpr unsigned int WinSiz = 16384;
#if defined __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wold-style-cast"
#elif defined __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wold-style-cast"
#endif
SPICEINT_CELL(ids, MaxObj);
SPICEDOUBLE_CELL(cover, WinSiz);
......@@ -1043,8 +1045,11 @@ void SpiceManager::findCkCoverage(const std::string& path) {
for (SpiceInt i = 0; i < card_c(&ids); ++i) {
const SpiceInt frame = SPICE_CELL_ELEM_I(&ids, i); // NOLINT
#if defined __clang__
#pragma clang diagnostic pop
#elif defined __GNUC__
#pragma GCC diagnostic pop
#endif
scard_c(0, &cover);
ckcov_c(path.c_str(), frame, SPICEFALSE, "SEGMENT", 0.0, "TDB", &cover);
......@@ -1080,11 +1085,13 @@ void SpiceManager::findSpkCoverage(const std::string& path) {
constexpr unsigned int MaxObj = 1024;
constexpr unsigned int WinSiz = 16384;
#if defined __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wold-style-cast"
#elif defined __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wold-style-cast"
#endif
SPICEINT_CELL(ids, MaxObj);
SPICEDOUBLE_CELL(cover, WinSiz);
......@@ -1097,8 +1104,11 @@ void SpiceManager::findSpkCoverage(const std::string& path) {
for (SpiceInt i = 0; i < card_c(&ids); ++i) {
const SpiceInt obj = SPICE_CELL_ELEM_I(&ids, i); // NOLINT
#if defined __clang__
#pragma clang diagnostic pop
#elif defined __GNUC__
#pragma GCC diagnostic pop
#endif
scard_c(0, &cover);
spkcov_c(path.c_str(), obj, &cover);
......
......@@ -28,7 +28,6 @@ function (set_openspace_compile_settings target)
set(MSVC_WARNINGS
"/MP" # Multi-threading support
"/W4" # Highest warning level
"/wd4068" # unknown pragma
"/wd4127" # conditional expression is constant [raised by: websocketpp]
"/wd4201" # nonstandard extension used : nameless struct/union [raised by: GLM]
"/wd5030" # attribute 'attribute' is not recognized [raised by: codegen]
......@@ -146,7 +145,6 @@ function (set_openspace_compile_settings target)
"-Wno-attributes"
"-Wno-missing-braces"
"-Wno-unknown-attributes"
"-Wno-unknown-pragmas"
)
if (OPENSPACE_WARNINGS_AS_ERRORS)
set(CLANG_WARNINGS ${CLANG_WARNINGS} "-Werror")
......@@ -185,7 +183,6 @@ function (set_openspace_compile_settings target)
"-Wno-float-equal"
"-Wno-long-long"
"-Wno-unknown-attributes"
"-Wno-unknown-pragmas"
"-Wno-write-strings"
)
if (OPENSPACE_WARNINGS_AS_ERRORS)
......
Subproject commit 44f17f1721651992df3ff6d9a992a02d23572aa7
Subproject commit ae8d21e9aa2903c6b13060239ffbb675e92e6a51
......@@ -433,17 +433,22 @@ TEST_CASE("SpiceManager: Get Position Transform Matrix", "[spicemanager]") {
}
}
#if defined __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wold-style-cast"
#elif defined __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wold-style-cast"
#endif
// transform reference position into new frame
mxvg_c(referenceMatrix, state, 3, 3, state_t);
#if defined __clang__
#pragma clang diagnostic pop
#elif defined __GNUC__
#pragma GCC diagnostic pop
#endif
position = positionMatrix * position;
// check transformed values match
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment