Message ID | 20221118200046.51305-1-Rauch.Christian@gmx.de |
---|---|
State | New |
Headers | show |
Series |
|
Related | show |
Hi Christian, Thank you for the patch. On Fri, Nov 18, 2022 at 09:00:46PM +0100, Christian Rauch via libcamera-devel wrote: > 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@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; The standard way to do this in C++ is to declare the function as void KMSSink::requestComplete([[maybe_unused]] DRM::AtomicRequest *request) > assert(queued_ && queued_->drmRequest_.get() == request); > > /* Complete the active request, if any. */
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. */
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@gmx.de> --- src/apps/cam/kms_sink.cpp | 1 + 1 file changed, 1 insertion(+) -- 2.34.1