[libcamera-devel] [PATCH] kms: void-cast 'request' to avoid 'unused-parameter' warnings

Christian Rauch Rauch.Christian at gmx.de
Fri Nov 18 21:00:46 CET 2022


The parameter 'request' is only used in an assert. assert is only defined
for debug builds and release builds will not use the parameter, resulting
in warnings messages only for non-debug builds.
Fix this by a no-op void cast.

Signed-off-by: Christian Rauch <Rauch.Christian at gmx.de>
---
 src/apps/cam/kms_sink.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/apps/cam/kms_sink.cpp b/src/apps/cam/kms_sink.cpp
index 754b061e..de0af51e 100644
--- a/src/apps/cam/kms_sink.cpp
+++ b/src/apps/cam/kms_sink.cpp
@@ -521,6 +521,7 @@ void KMSSink::requestComplete(DRM::AtomicRequest *request)
 {
 	std::lock_guard<std::mutex> lock(lock_);

+	(void) request;
 	assert(queued_ && queued_->drmRequest_.get() == request);

 	/* Complete the active request, if any. */
--
2.34.1



More information about the libcamera-devel mailing list