[libcamera-devel] lc-compliance: Drop return value from SimpleCapture::stop()
diff mbox series

Message ID 20210413215144.2733876-1-niklas.soderlund@ragnatech.se
State Accepted
Commit 58f558fddaf3d7d149ab1c320c2cee7c6948ec01
Headers show
Series
  • [libcamera-devel] lc-compliance: Drop return value from SimpleCapture::stop()
Related show

Commit Message

Niklas Söderlund April 13, 2021, 9:51 p.m. UTC
The return value is never checked and serves to real usage, drop it.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
---
 src/lc-compliance/simple_capture.cpp | 4 +---
 src/lc-compliance/simple_capture.h   | 2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)

Comments

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

Thank you for the patch.

On Tue, Apr 13, 2021 at 11:51:44PM +0200, Niklas Söderlund wrote:
> The return value is never checked and serves to real usage, drop it.
> 
> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>

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

> ---
>  src/lc-compliance/simple_capture.cpp | 4 +---
>  src/lc-compliance/simple_capture.h   | 2 +-
>  2 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/src/lc-compliance/simple_capture.cpp b/src/lc-compliance/simple_capture.cpp
> index 8f714d3b5e73e28e..811a6220009654be 100644
> --- a/src/lc-compliance/simple_capture.cpp
> +++ b/src/lc-compliance/simple_capture.cpp
> @@ -50,7 +50,7 @@ Results::Result SimpleCapture::start()
>  	return { Results::Pass, "Started camera" };
>  }
>  
> -Results::Result SimpleCapture::stop()
> +void SimpleCapture::stop()
>  {
>  	Stream *stream = config_->at(0).stream();
>  
> @@ -59,8 +59,6 @@ Results::Result SimpleCapture::stop()
>  	camera_->requestCompleted.disconnect(this, &SimpleCapture::requestComplete);
>  
>  	allocator_->free(stream);
> -
> -	return { Results::Pass, "Stopped camera" };
>  }
>  
>  /* SimpleCaptureBalanced */
> diff --git a/src/lc-compliance/simple_capture.h b/src/lc-compliance/simple_capture.h
> index 4693c13404cee7d2..d9de53fb63a3ea3f 100644
> --- a/src/lc-compliance/simple_capture.h
> +++ b/src/lc-compliance/simple_capture.h
> @@ -24,7 +24,7 @@ protected:
>  	virtual ~SimpleCapture();
>  
>  	Results::Result start();
> -	Results::Result stop();
> +	void stop();
>  
>  	virtual void requestComplete(libcamera::Request *request) = 0;
>

Patch
diff mbox series

diff --git a/src/lc-compliance/simple_capture.cpp b/src/lc-compliance/simple_capture.cpp
index 8f714d3b5e73e28e..811a6220009654be 100644
--- a/src/lc-compliance/simple_capture.cpp
+++ b/src/lc-compliance/simple_capture.cpp
@@ -50,7 +50,7 @@  Results::Result SimpleCapture::start()
 	return { Results::Pass, "Started camera" };
 }
 
-Results::Result SimpleCapture::stop()
+void SimpleCapture::stop()
 {
 	Stream *stream = config_->at(0).stream();
 
@@ -59,8 +59,6 @@  Results::Result SimpleCapture::stop()
 	camera_->requestCompleted.disconnect(this, &SimpleCapture::requestComplete);
 
 	allocator_->free(stream);
-
-	return { Results::Pass, "Stopped camera" };
 }
 
 /* SimpleCaptureBalanced */
diff --git a/src/lc-compliance/simple_capture.h b/src/lc-compliance/simple_capture.h
index 4693c13404cee7d2..d9de53fb63a3ea3f 100644
--- a/src/lc-compliance/simple_capture.h
+++ b/src/lc-compliance/simple_capture.h
@@ -24,7 +24,7 @@  protected:
 	virtual ~SimpleCapture();
 
 	Results::Result start();
-	Results::Result stop();
+	void stop();
 
 	virtual void requestComplete(libcamera::Request *request) = 0;