[libcamera-devel,v1.1] ipa: rkisp1: Initialize numCells in constructor
diff mbox series

Message ID 20211130071058.47834-1-jeanmichel.hautbois@ideasonboard.com
State Accepted
Commit 437cc396685a8c50974688b814b08d36e086a9b1
Headers show
Series
  • [libcamera-devel,v1.1] ipa: rkisp1: Initialize numCells in constructor
Related show

Commit Message

Jean-Michel Hautbois Nov. 30, 2021, 7:10 a.m. UTC
The non-static class member "numCells_" is not initialized in the
constructor. Fix it.

Reported-by: Coverity CID 365801
Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
---
 src/ipa/rkisp1/algorithms/agc.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kieran Bingham Nov. 30, 2021, 4:33 p.m. UTC | #1
Quoting Jean-Michel Hautbois (2021-11-30 07:10:58)
> The non-static class member "numCells_" is not initialized in the
> constructor. Fix it.
> 

This is never used uninitialised, as it's always set in the configure
call, but I think it's fine to clean it up.


Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> Reported-by: Coverity CID 365801
> Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
> ---
>  src/ipa/rkisp1/algorithms/agc.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/ipa/rkisp1/algorithms/agc.cpp b/src/ipa/rkisp1/algorithms/agc.cpp
> index 650fe2dae..d6abdc310 100644
> --- a/src/ipa/rkisp1/algorithms/agc.cpp
> +++ b/src/ipa/rkisp1/algorithms/agc.cpp
> @@ -53,7 +53,7 @@ static constexpr uint32_t kNumStartupFrames = 10;
>  static constexpr double kRelativeLuminanceTarget = 0.4;
>  
>  Agc::Agc()
> -       : frameCount_(0), filteredExposure_(0s)
> +       : frameCount_(0), numCells_(0), filteredExposure_(0s)
>  {
>  }
>  
> -- 
> 2.32.0
>

Patch
diff mbox series

diff --git a/src/ipa/rkisp1/algorithms/agc.cpp b/src/ipa/rkisp1/algorithms/agc.cpp
index 650fe2dae..d6abdc310 100644
--- a/src/ipa/rkisp1/algorithms/agc.cpp
+++ b/src/ipa/rkisp1/algorithms/agc.cpp
@@ -53,7 +53,7 @@  static constexpr uint32_t kNumStartupFrames = 10;
 static constexpr double kRelativeLuminanceTarget = 0.4;
 
 Agc::Agc()
-	: frameCount_(0), filteredExposure_(0s)
+	: frameCount_(0), numCells_(0), filteredExposure_(0s)
 {
 }