[libcamera-devel] lc-compliance: Initialize the event loop pointer
diff mbox series

Message ID 20210413215256.2734772-1-niklas.soderlund@ragnatech.se
State Accepted
Commit 6c96861ea36f0596fbf4440e457d9366e6855d19
Headers show
Series
  • [libcamera-devel] lc-compliance: Initialize the event loop pointer
Related show

Commit Message

Niklas Söderlund April 13, 2021, 9:52 p.m. UTC
The event loop pointer loop_ was not initialized. This have no effect on
the current code flow but could in the future lead to hard debug
problems.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
---
 src/lc-compliance/simple_capture.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Laurent Pinchart April 13, 2021, 9:55 p.m. UTC | #1
Hi Niklas,

Thank you for the patch.

On Tue, Apr 13, 2021 at 11:52:56PM +0200, Niklas Söderlund wrote:
> The event loop pointer loop_ was not initialized. This have no effect on

s/have/has/

> the current code flow but could in the future lead to hard debug
> problems.
> 
> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  src/lc-compliance/simple_capture.cpp | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/lc-compliance/simple_capture.cpp b/src/lc-compliance/simple_capture.cpp
> index 0ff720bfd0052e45..8f714d3b5e73e28e 100644
> --- a/src/lc-compliance/simple_capture.cpp
> +++ b/src/lc-compliance/simple_capture.cpp
> @@ -10,7 +10,8 @@
>  using namespace libcamera;
>  
>  SimpleCapture::SimpleCapture(std::shared_ptr<Camera> camera)
> -	: camera_(camera), allocator_(std::make_unique<FrameBufferAllocator>(camera))
> +	: loop_(nullptr), camera_(camera),
> +	  allocator_(std::make_unique<FrameBufferAllocator>(camera))
>  {
>  }
>

Patch
diff mbox series

diff --git a/src/lc-compliance/simple_capture.cpp b/src/lc-compliance/simple_capture.cpp
index 0ff720bfd0052e45..8f714d3b5e73e28e 100644
--- a/src/lc-compliance/simple_capture.cpp
+++ b/src/lc-compliance/simple_capture.cpp
@@ -10,7 +10,8 @@ 
 using namespace libcamera;
 
 SimpleCapture::SimpleCapture(std::shared_ptr<Camera> camera)
-	: camera_(camera), allocator_(std::make_unique<FrameBufferAllocator>(camera))
+	: loop_(nullptr), camera_(camera),
+	  allocator_(std::make_unique<FrameBufferAllocator>(camera))
 {
 }