From 910170cab61a5940f44437b770021e40d8ec1683 Mon Sep 17 00:00:00 2001
From: Stefan Bienert <stefan.bienert@unibas.ch>
Date: Thu, 6 Feb 2020 10:21:52 +0100
Subject: [PATCH] SCHWED-4612: Ignore warning about unused functions by GCC,
 while the functions are used by unit tests.

---
 modules/img/alg/src/fill.hh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/modules/img/alg/src/fill.hh b/modules/img/alg/src/fill.hh
index b023d70f5..34e50e72e 100644
--- a/modules/img/alg/src/fill.hh
+++ b/modules/img/alg/src/fill.hh
@@ -32,11 +32,17 @@ namespace {
 template<typename T>
 void set_val(T& v, Real rv, const Complex& cv);
 
+/* While the functions below are employed by the OST unit tests, GCC does not
+   notice this and complains about "unused functions".
+*/
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
 template<>
 void set_val<Real>(Real& v, Real rv, const Complex& cv) {v=rv;}
 
 template<>
 void set_val<Complex>(Complex& v, Real rv, const Complex& cv) {v=cv;}
+#pragma GCC diagnostic pop
 
 template<typename T>
 void set_val(T& v, Real rv, const Complex& cv)
-- 
GitLab