[libcamera-devel] [PATCH 2/4] libcamera: ipa: raspberrypi: focus: Fix for uninitialised variable

Laurent Pinchart laurent.pinchart at ideasonboard.com
Fri Jul 3 03:02:32 CEST 2020


Hi Naush,

Thank you for the patch.

On Fri, Jun 26, 2020 at 11:25:29AM +0100, Naushir Patuck wrote:
> Coverity static analysis check was reporting print_ was not initialised
> before being used in process(). Add an explicit initialiser for print_
> to the constructor.
> 
> Reported-by: Coverity CID=293456
> Signed-off-by: Naushir Patuck <naush at raspberrypi.com>

This looks good, but David submitted a patch that removes the print_
field, so this one won't be applicable anymore.

> ---
>  src/ipa/raspberrypi/controller/rpi/focus.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/ipa/raspberrypi/controller/rpi/focus.cpp b/src/ipa/raspberrypi/controller/rpi/focus.cpp
> index 1e2b6491..4028ba56 100644
> --- a/src/ipa/raspberrypi/controller/rpi/focus.cpp
> +++ b/src/ipa/raspberrypi/controller/rpi/focus.cpp
> @@ -15,7 +15,7 @@ using namespace RPi;
>  #define NAME "rpi.focus"
>  
>  Focus::Focus(Controller *controller)
> -	: Algorithm(controller)
> +	: Algorithm(controller), print_(false)
>  {
>  }
>  

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list