From 888d0047648c008e884a017a3ef8be5fdf72ced4 Mon Sep 17 00:00:00 2001
From: Nicolas Werner <nicolas.werner@hotmail.de>
Date: Fri, 30 Oct 2020 03:22:48 +0100
Subject: [PATCH] Supress unused var warning for STUN_SERVER (used only if
 gstreamer supported)

---
 src/Olm.cpp             | 4 ++--
 src/TextInputWidget.cpp | 4 ++--
 src/Utils.cpp           | 2 +-
 src/WebRTCSession.cpp   | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/Olm.cpp b/src/Olm.cpp
index af8bb512e..cdafabf30 100644
--- a/src/Olm.cpp
+++ b/src/Olm.cpp
@@ -435,8 +435,8 @@ send_key_request_for(mtx::events::EncryptedEvent<mtx::events::msg::Encrypted> e,
                                e.content.session_id);
 
         mtx::events::msg::KeyRequest request;
-        request.action               = !cancel ? mtx::events::msg::RequestAction::Request
-                                               : mtx::events::msg::RequestAction::Cancellation;
+        request.action = !cancel ? mtx::events::msg::RequestAction::Request
+                                 : mtx::events::msg::RequestAction::Cancellation;
         request.algorithm            = MEGOLM_ALGO;
         request.room_id              = e.room_id;
         request.sender_key           = e.content.sender_key;
diff --git a/src/TextInputWidget.cpp b/src/TextInputWidget.cpp
index c75c6c89f..81c1bce9a 100644
--- a/src/TextInputWidget.cpp
+++ b/src/TextInputWidget.cpp
@@ -453,8 +453,8 @@ FilteredTextEdit::completerRect()
         auto item_height = completer_->popup()->sizeHintForRow(0);
         auto max_height  = item_height * completer_->maxVisibleItems();
         auto height      = (completer_->completionCount() > completer_->maxVisibleItems())
-                             ? max_height
-                             : completer_->completionCount() * item_height;
+                        ? max_height
+                        : completer_->completionCount() * item_height;
         rect.setWidth(completer_->popup()->sizeHintForColumn(0));
         rect.moveBottom(-height);
         return rect;
diff --git a/src/Utils.cpp b/src/Utils.cpp
index 38dbba220..0bfc82c39 100644
--- a/src/Utils.cpp
+++ b/src/Utils.cpp
@@ -638,7 +638,7 @@ utils::luminance(const QColor &col)
         qreal lumRgb[3];
 
         for (int i = 0; i < 3; i++) {
-                qreal v = colRgb[i] / 255.0;
+                qreal v                  = colRgb[i] / 255.0;
                 v <= 0.03928 ? lumRgb[i] = v / 12.92 : lumRgb[i] = qPow((v + 0.055) / 1.055, 2.4);
         }
 
diff --git a/src/WebRTCSession.cpp b/src/WebRTCSession.cpp
index 890bb8669..c746df8e7 100644
--- a/src/WebRTCSession.cpp
+++ b/src/WebRTCSession.cpp
@@ -25,7 +25,7 @@ extern "C"
 #endif
 
 // https://github.com/vector-im/riot-web/issues/10173
-constexpr std::string_view STUN_SERVER = "stun://turn.matrix.org:3478";
+[[maybe_unused]] constexpr std::string_view STUN_SERVER = "stun://turn.matrix.org:3478";
 
 Q_DECLARE_METATYPE(webrtc::State)
 
-- 
GitLab