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

David Plowman david.plowman at raspberrypi.com
Fri Jul 3 10:06:33 CEST 2020


Hi Naush, Laurent


On Fri, 3 Jul 2020 at 02:02, Laurent Pinchart
<laurent.pinchart at ideasonboard.com> wrote:
>
> 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.

Indeed, sorry for the churn. I think we just drop this particular
patch and it's all good.

Best regards
David

>
> > ---
> >  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
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel


More information about the libcamera-devel mailing list