[PATCH] pipeline: rpi: pisp: Fix uninitialized variable warning

Kieran Bingham kieran.bingham at ideasonboard.com
Thu Mar 20 17:11:29 CET 2025


Quoting Naushir Patuck (2025-03-20 16:07:28)
> Hi Laurent,
> 
> Thanks for fixing this.
> 
> On Thu, 20 Mar 2025 at 16:05, Laurent Pinchart
> <laurent.pinchart at ideasonboard.com> wrote:
> >
> > gcc 13.3.0 from buildroot 2024.11.1 complains about an uninitialized
> > variable. This is a false positive as the cfe_ array can't be empty.
> > Nonetheless, it breaks builds, so initialize the variable to work around
> > the issue.
> >
> > Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> 
> Reviewed-by: Naushir Patuck <naush at raspberrypi.com>
> 

Yup, lets keep the compiler happy...

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

> > ---
> >  src/libcamera/pipeline/rpi/pisp/pisp.cpp | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/src/libcamera/pipeline/rpi/pisp/pisp.cpp b/src/libcamera/pipeline/rpi/pisp/pisp.cpp
> > index 0f9e332667c0..42ca7c80b10a 100644
> > --- a/src/libcamera/pipeline/rpi/pisp/pisp.cpp
> > +++ b/src/libcamera/pipeline/rpi/pisp/pisp.cpp
> > @@ -1700,7 +1700,7 @@ void PiSPCameraData::platformFreeBuffers()
> >  void PiSPCameraData::cfeBufferDequeue(FrameBuffer *buffer)
> >  {
> >         RPi::Stream *stream = nullptr;
> > -       int index;
> > +       int index = 0;
> >
> >         if (!isRunning())
> >                 return;
> >
> > base-commit: 841ef2b4bb08ba48470817ff1f838efcce377fee
> > --
> > Regards,
> >
> > Laurent Pinchart
> >


More information about the libcamera-devel mailing list