Skip to content

Commit

Permalink
Merge pull request #751 from neutronimaging/issue709_fdkwarnings
Browse files Browse the repository at this point in the history
Issue709 fdkwarnings
  • Loading branch information
anderskaestner authored Dec 9, 2024
2 parents fbdb6a4 + fe988fd commit 7eea4fb
Show file tree
Hide file tree
Showing 33 changed files with 358 additions and 177 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -700,9 +700,13 @@ void TestImagingAlgorithms::ProjSeriesCorr_Correction()

}

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
QTEST_APPLESS_MAIN(TestImagingAlgorithms)
#pragma clang diagnostic pop
#ifdef __APPLE__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
QTEST_APPLESS_MAIN(TestImagingAlgorithms)
#pragma clang diagnostic pop
#else
QTEST_APPLESS_MAIN(TestImagingAlgorithms)
#endif

#include "tst_testImagingAlgorithms.moc"
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,14 @@ void TImagingQAAlgorithmsTest::testProfileExtractor()

}

QTEST_APPLESS_MAIN(TImagingQAAlgorithmsTest)
#ifdef __APPLE__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
QTEST_APPLESS_MAIN(TImagingQAAlgorithmsTest)
#pragma clang diagnostic pop
#else
QTEST_APPLESS_MAIN(TImagingQAAlgorithmsTest)
#endif


#include "tst_ImagingQAAlgorithms.moc"
9 changes: 8 additions & 1 deletion core/kipl/UnitTests/tDirAnalysis/tst_tdiranalysistest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,13 @@ void TDirAnalysisTest::testCountLinesInFile()

QVERIFY(N==cnt);
}
QTEST_APPLESS_MAIN(TDirAnalysisTest)
#ifdef __APPLE__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
QTEST_APPLESS_MAIN(TDirAnalysisTest)
#pragma clang diagnostic pop
#else
QTEST_APPLESS_MAIN(TDirAnalysisTest)
#endif

#include "tst_tdiranalysistest.moc"
11 changes: 10 additions & 1 deletion core/kipl/UnitTests/tFillHole/tst_fillholetest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ void FillHoleTest::testCase1()
QVERIFY2(true, "Failure");
}

QTEST_APPLESS_MAIN(FillHoleTest)

#ifdef __APPLE__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
QTEST_APPLESS_MAIN(FillHoleTest)
#pragma clang diagnostic pop
#else
QTEST_APPLESS_MAIN(FillHoleTest)
#endif


#include "tst_fillholetest.moc"
10 changes: 9 additions & 1 deletion core/kipl/UnitTests/tImageOperators/tst_timageoperatorstest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,15 @@ void TImageOperatorsTest::makeTestImage()

}

QTEST_APPLESS_MAIN(TImageOperatorsTest)
#ifdef __APPLE__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
QTEST_APPLESS_MAIN(TImageOperatorsTest)
#pragma clang diagnostic pop
#else
QTEST_APPLESS_MAIN(TImageOperatorsTest)
#endif


#include "tst_timageoperatorstest.moc"

Expand Down
9 changes: 8 additions & 1 deletion core/kipl/UnitTests/tIndex2Coord/tst_tindex2coordtest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,15 @@ void TIndex2CoordTest::testIndex2Coord3D()

}

#ifdef __APPLE__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
QTEST_APPLESS_MAIN(TIndex2CoordTest)
#pragma clang diagnostic pop
#else
QTEST_APPLESS_MAIN(TIndex2CoordTest)
#endif


QTEST_APPLESS_MAIN(TIndex2CoordTest)

#include "tst_tindex2coordtest.moc"
12 changes: 11 additions & 1 deletion core/kipl/UnitTests/tKIPLHistogram/tst_histogram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,17 @@ void HistogramTest::benchmarkOpt()
}
}

QTEST_APPLESS_MAIN(HistogramTest)

#ifdef __APPLE__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
QTEST_APPLESS_MAIN(HistogramTest)
#pragma clang diagnostic pop
#else
QTEST_APPLESS_MAIN(HistogramTest)
#endif



#include "tst_histogram.moc"

Expand Down
10 changes: 9 additions & 1 deletion core/kipl/UnitTests/tKIPLMathFunctions/tst_MathFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,14 @@ void MathFunctionsTest::testFactorial()
QCOMPARE(kipl::math::factorial(10), 3628800);
}

QTEST_APPLESS_MAIN(MathFunctionsTest)
#ifdef __APPLE__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
QTEST_APPLESS_MAIN(MathFunctionsTest)
#pragma clang diagnostic pop
#else
QTEST_APPLESS_MAIN(MathFunctionsTest)
#endif


#include "tst_MathFunctions.moc"
10 changes: 9 additions & 1 deletion core/kipl/UnitTests/tKIPLTimers/tst_timertests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,15 @@ void TimerTests::test_ThreadedTiming()

}

QTEST_APPLESS_MAIN(TimerTests)
#ifdef __APPLE__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
QTEST_APPLESS_MAIN(TimerTests)
#pragma clang diagnostic pop
#else
QTEST_APPLESS_MAIN(TimerTests)
#endif


#include "tst_timertests.moc"

Expand Down
10 changes: 9 additions & 1 deletion core/kipl/UnitTests/tKIPL_IO/tst_kipl_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,14 @@ void tKIPL_IOTest::testReadNexus()

}

QTEST_APPLESS_MAIN(tKIPL_IOTest)
#ifdef __APPLE__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
QTEST_APPLESS_MAIN(tKIPL_IOTest)
#pragma clang diagnostic pop
#else
QTEST_APPLESS_MAIN(tKIPL_IOTest)
#endif


#include "tst_kipl_io.moc"
11 changes: 10 additions & 1 deletion core/kipl/UnitTests/tKIPLbaseTImage/tst_tkiplbasetimagetest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,15 @@ void TKIPLbaseTImageTest::testDataAccess()
// indexing outside buffer

}
QTEST_APPLESS_MAIN(TKIPLbaseTImageTest)

#ifdef __APPLE__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
QTEST_APPLESS_MAIN(TKIPLbaseTImageTest)
#pragma clang diagnostic pop
#else
QTEST_APPLESS_MAIN(TKIPLbaseTImageTest)
#endif


#include "tst_tkiplbasetimagetest.moc"
10 changes: 9 additions & 1 deletion core/kipl/UnitTests/tKiplMath/tst_tkiplmathtest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,14 @@ void TKiplMathTest::testFindLimits()
QCOMPARE(hi,89UL);
}

QTEST_APPLESS_MAIN(TKiplMathTest)
#ifdef __APPLE__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
QTEST_APPLESS_MAIN(TKiplMathTest)
#pragma clang diagnostic pop
#else
QTEST_APPLESS_MAIN(TKiplMathTest)
#endif


#include "tst_tkiplmathtest.moc"
10 changes: 9 additions & 1 deletion core/kipl/UnitTests/tLinFit/tst_tlinfittest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ void TLinFitTest::testCalls()

}

QTEST_APPLESS_MAIN(TLinFitTest)
#ifdef __APPLE__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
QTEST_APPLESS_MAIN(TLinFitTest)
#pragma clang diagnostic pop
#else
QTEST_APPLESS_MAIN(TLinFitTest)
#endif


#include "tst_tlinfittest.moc"
11 changes: 10 additions & 1 deletion core/kipl/UnitTests/tLogging/tst_logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,15 @@ void LoggingTests::testMultiTargetLogger()

}

QTEST_APPLESS_MAIN(LoggingTests)
#ifdef __APPLE__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
QTEST_APPLESS_MAIN(LoggingTests)
#pragma clang diagnostic pop
#else
QTEST_APPLESS_MAIN(LoggingTests)
#endif



#include "include/tst_logging.moc"
11 changes: 10 additions & 1 deletion core/kipl/UnitTests/tNoiseImage/tst_noiseimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ void TNoiseImageTest::testPoisson()

}

QTEST_APPLESS_MAIN(TNoiseImageTest)

#ifdef __APPLE__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
QTEST_APPLESS_MAIN(TNoiseImageTest)
#pragma clang diagnostic pop
#else
QTEST_APPLESS_MAIN(TNoiseImageTest)
#endif


#include "tst_noiseimage.moc"
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ void STLVecOperations::test_MAD()

}

QTEST_APPLESS_MAIN(STLVecOperations)
#ifdef __APPLE__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
QTEST_APPLESS_MAIN(STLVecOperations)
#pragma clang diagnostic pop
#else
QTEST_APPLESS_MAIN(STLVecOperations)
#endif

#include "include/tst_stlvecoperations.moc"
10 changes: 9 additions & 1 deletion core/kipl/UnitTests/tThreadPool/tst_ThreadPool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,14 @@ void TestThreadPool::test_Transform()
}
}

QTEST_APPLESS_MAIN(TestThreadPool)

#ifdef __APPLE__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
QTEST_APPLESS_MAIN(TestThreadPool)
#pragma clang diagnostic pop
#else
QTEST_APPLESS_MAIN(TestThreadPool)
#endif

#include "tst_ThreadPool.moc"
10 changes: 9 additions & 1 deletion core/kipl/UnitTests/tedgefunction/tst_tedgefunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,14 @@ void tedgefunction::test_case1()
std::cout << "testing case 1 empty" << std::endl;
}

QTEST_APPLESS_MAIN(tedgefunction)
#ifdef __APPLE__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
QTEST_APPLESS_MAIN(tedgefunction)
#pragma clang diagnostic pop
#else
QTEST_APPLESS_MAIN(tedgefunction)
#endif


#include "tst_tedgefunction.moc"
11 changes: 10 additions & 1 deletion core/kipl/UnitTests/tkiplbasetest/tst_kiplbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,15 @@ void Tkiplbase::testRotationDirection()

}

QTEST_APPLESS_MAIN(Tkiplbase)

#ifdef __APPLE__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
QTEST_APPLESS_MAIN(Tkiplbase)
#pragma clang diagnostic pop
#else
QTEST_APPLESS_MAIN(Tkiplbase)
#endif


#include "tst_kiplbase.moc"
10 changes: 9 additions & 1 deletion core/kipl/UnitTests/tkiplfilters/tst_kiplfilters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,14 @@ void KiplFilters::benchmark_MedianFilterParallel()
}
}

QTEST_APPLESS_MAIN(KiplFilters)
#ifdef __APPLE__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
QTEST_APPLESS_MAIN(KiplFilters)
#pragma clang diagnostic pop
#else
QTEST_APPLESS_MAIN(KiplFilters)
#endif


#include "tst_kiplfilters.moc"
4 changes: 2 additions & 2 deletions core/kipl/kipl/include/math/core/LinearAlgebra.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,14 @@ T TMatrix<T>::Determinant()


template<typename T>
TMatrix<T> Solve(TMatrix<T> &a, TMatrix<T> &b)
TMatrix<T> Solve(TMatrix<T> & /*a*/, TMatrix<T> & /*b*/)
{
TMatrix<T> x;
return x;
}

template<typename T>
void LUdecomposition(const TMatrix<T> &a, TMatrix<T> &L,TMatrix<T> &U)
void LUdecomposition(const TMatrix<T> &a, TMatrix<T> & /*L*/,TMatrix<T> &U)
{
if (a.Rows()!=a.Cols())
throw kipl::base::KiplException("LUdecomp: Matrix is not square",__FILE__, __LINE__);
Expand Down
10 changes: 9 additions & 1 deletion core/modules/UnitTests/tModuleConfig/tst_configbasetest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,14 @@ void ConfigBaseTest::testLibNameManagerWindows()

}

QTEST_APPLESS_MAIN(ConfigBaseTest)
#ifdef __APPLE__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
QTEST_APPLESS_MAIN(ConfigBaseTest)
#pragma clang diagnostic pop
#else
QTEST_APPLESS_MAIN(ConfigBaseTest)
#endif


#include "tst_configbasetest.moc"
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,14 @@ void TReaderConfigTest::testCreateDirectories()
fs::remove_all("a2");
}

#ifdef __APPLE__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
QTEST_APPLESS_MAIN(TReaderConfigTest)
#pragma clang diagnostic pop
#else
QTEST_APPLESS_MAIN(TReaderConfigTest)
#endif

QTEST_APPLESS_MAIN(TReaderConfigTest)

#include "tst_treaderconfigtest.moc"
Loading

0 comments on commit 7eea4fb

Please sign in to comment.