[{"id":33667,"web_url":"https://patchwork.libcamera.org/comment/33667/","msgid":"<CAEmqJPpodRfbwAcKVs_hW4AEwMYQavykE4XtYpwLYmAqL_aOSQ@mail.gmail.com>","date":"2025-03-20T16:07:28","subject":"Re: [PATCH] pipeline: rpi: pisp: Fix uninitialized variable warning","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi Laurent,\n\nThanks for fixing this.\n\nOn Thu, 20 Mar 2025 at 16:05, Laurent Pinchart\n<laurent.pinchart@ideasonboard.com> wrote:\n>\n> gcc 13.3.0 from buildroot 2024.11.1 complains about an uninitialized\n> variable. This is a false positive as the cfe_ array can't be empty.\n> Nonetheless, it breaks builds, so initialize the variable to work around\n> the issue.\n>\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Naushir Patuck <naush@raspberrypi.com>\n\n> ---\n>  src/libcamera/pipeline/rpi/pisp/pisp.cpp | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/src/libcamera/pipeline/rpi/pisp/pisp.cpp b/src/libcamera/pipeline/rpi/pisp/pisp.cpp\n> index 0f9e332667c0..42ca7c80b10a 100644\n> --- a/src/libcamera/pipeline/rpi/pisp/pisp.cpp\n> +++ b/src/libcamera/pipeline/rpi/pisp/pisp.cpp\n> @@ -1700,7 +1700,7 @@ void PiSPCameraData::platformFreeBuffers()\n>  void PiSPCameraData::cfeBufferDequeue(FrameBuffer *buffer)\n>  {\n>         RPi::Stream *stream = nullptr;\n> -       int index;\n> +       int index = 0;\n>\n>         if (!isRunning())\n>                 return;\n>\n> base-commit: 841ef2b4bb08ba48470817ff1f838efcce377fee\n> --\n> Regards,\n>\n> Laurent Pinchart\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 8F862C3301\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 20 Mar 2025 16:08:08 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DCE0968951;\n\tThu, 20 Mar 2025 17:08:07 +0100 (CET)","from mail-yw1-x112c.google.com (mail-yw1-x112c.google.com\n\t[IPv6:2607:f8b0:4864:20::112c])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E0CF2617F5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 20 Mar 2025 17:08:05 +0100 (CET)","by mail-yw1-x112c.google.com with SMTP id\n\t00721157ae682-6ff4e4b8b3dso608047b3.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 20 Mar 2025 09:08:05 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"FosKeHDj\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1742486885; x=1743091685;\n\tdarn=lists.libcamera.org; \n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:from:to:cc:subject:date:message-id:reply-to;\n\tbh=2YBfqnnDVfob2XEZp976qDgE5591/ktWSPdpt1awuHs=;\n\tb=FosKeHDjv9wnVtfnjoYq2lhi2aYM9Vokjrm9fCAcDxZbMiOARMBbbCoCvaP7aq812J\n\tMVCbvyfjQgher8iXocvixyaNF4sLm5jgEP6TtfPGHnx60JmPfAwDkjn14vtNgerf61Im\n\txhpPCGDTIVLxwIiNCk5lK2OzbHmpk4NIAx0veBP9mvJ1tK+oKHgrRaEChZLJQPqK1zyd\n\tLn+RwqtREBn5blVft8AvSnkvd3Q7bdV9L76F0QFIwJQ1tM41oDR/ygl9QqnlSKJJDSXF\n\t3w8h2aE7s1O8o1Ct6ImkMbhy6kX4nw4QvHVgi4i2COeUwVRmvemrIQ3drKhHjlqlOZsI\n\tVrrQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1742486885; x=1743091685;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=2YBfqnnDVfob2XEZp976qDgE5591/ktWSPdpt1awuHs=;\n\tb=hMVBU7pIo8n46jYGSWkIK6isJkqJIuJEzZNn2eJw11VGFKB+Zy3oP3wiYCxFS8y0p/\n\toMNgwngbqSyAFc9qqv2/HaYkDNouW9rUgTe0K4dSKev1MnATjj/lXKVjCMsjv47zb4Y/\n\tJ5/QbzMgv384QyvRPoHlY2h2fNRCSf+s3/WvT90ZdvLVhx90QDBAAWZ6dNSvxiVRT/rA\n\tPxw7tAbInKl0HTCGHkvURs+lYQNLxo+02UBMrDtQP1GMISm+15x4VKD4NHQjlfgKhO9N\n\t0B/pPGO4dEAWd32cr/7eUv4EHJ5JUy5j4BYyK+2iZjM/IyoaU9j/VfbgW9JMccIZ4PoC\n\toGOg==","X-Gm-Message-State":"AOJu0YyUS1QyKy6m0zbACKPYYkRjPUqDr5EbgK61iKybwXEhf77LCFq3\n\tdGV56tK0G4mE0R/hCB1ERrPmr+uf8pZ0CqXt0kmM5K2uGunsBcX59RjvYPpDdH6dH2qMisK629y\n\tBr/z1l3pZickKRCJO7mMDjtsV8b04lDtXv6UInYoq0XB37qwK","X-Gm-Gg":"ASbGnct9robazKtMNmnmiUh9e95PczpviwCknROgQCzJTGwnOcyaJKAMC/CTtSgU13C\n\tH5kYtOkmqAZSmezA0YVpa7GCQK+zCOJlZ0tI7fv4bhJH9lm90ApqmjAOlhvmwPPBi0KvBGgnfLR\n\tqozoBwz08LyZ9iUepdtDS8e+kICDI/AooLAimt7+kW1dRgThkDkZTnIEOchg==","X-Google-Smtp-Source":"AGHT+IEERUwzJ/VpwPuerVHXJ6aE77lPT0rGSDRIQeT7tvPQ9blH8Qu/R22NQYBjemLCoIDjWdN6VSxxuOWNOjhNRaY=","X-Received":"by 2002:a05:690c:fcc:b0:6f9:7732:f3b5 with SMTP id\n\t00721157ae682-7009c15675cmr45190367b3.6.1742486884585;\n\tThu, 20 Mar 2025 09:08:04 -0700 (PDT)","MIME-Version":"1.0","References":"<20250320160521.301-1-laurent.pinchart@ideasonboard.com>","In-Reply-To":"<20250320160521.301-1-laurent.pinchart@ideasonboard.com>","From":"Naushir Patuck <naush@raspberrypi.com>","Date":"Thu, 20 Mar 2025 16:07:28 +0000","X-Gm-Features":"AQ5f1JrGn8IyJyXe7n3yeqIvr3qvDPdTC0Z0puKE5fj0lDd8plIwUwG70wTVSk0","Message-ID":"<CAEmqJPpodRfbwAcKVs_hW4AEwMYQavykE4XtYpwLYmAqL_aOSQ@mail.gmail.com>","Subject":"Re: [PATCH] pipeline: rpi: pisp: Fix uninitialized variable warning","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"UTF-8\"","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":33668,"web_url":"https://patchwork.libcamera.org/comment/33668/","msgid":"<174248708900.783128.1144286538345783038@ping.linuxembedded.co.uk>","date":"2025-03-20T16:11:29","subject":"Re: [PATCH] pipeline: rpi: pisp: Fix uninitialized variable warning","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Naushir Patuck (2025-03-20 16:07:28)\n> Hi Laurent,\n> \n> Thanks for fixing this.\n> \n> On Thu, 20 Mar 2025 at 16:05, Laurent Pinchart\n> <laurent.pinchart@ideasonboard.com> wrote:\n> >\n> > gcc 13.3.0 from buildroot 2024.11.1 complains about an uninitialized\n> > variable. This is a false positive as the cfe_ array can't be empty.\n> > Nonetheless, it breaks builds, so initialize the variable to work around\n> > the issue.\n> >\n> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> \n> Reviewed-by: Naushir Patuck <naush@raspberrypi.com>\n> \n\nYup, lets keep the compiler happy...\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> > ---\n> >  src/libcamera/pipeline/rpi/pisp/pisp.cpp | 2 +-\n> >  1 file changed, 1 insertion(+), 1 deletion(-)\n> >\n> > diff --git a/src/libcamera/pipeline/rpi/pisp/pisp.cpp b/src/libcamera/pipeline/rpi/pisp/pisp.cpp\n> > index 0f9e332667c0..42ca7c80b10a 100644\n> > --- a/src/libcamera/pipeline/rpi/pisp/pisp.cpp\n> > +++ b/src/libcamera/pipeline/rpi/pisp/pisp.cpp\n> > @@ -1700,7 +1700,7 @@ void PiSPCameraData::platformFreeBuffers()\n> >  void PiSPCameraData::cfeBufferDequeue(FrameBuffer *buffer)\n> >  {\n> >         RPi::Stream *stream = nullptr;\n> > -       int index;\n> > +       int index = 0;\n> >\n> >         if (!isRunning())\n> >                 return;\n> >\n> > base-commit: 841ef2b4bb08ba48470817ff1f838efcce377fee\n> > --\n> > Regards,\n> >\n> > Laurent Pinchart\n> >","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id D2F47C3304\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 20 Mar 2025 16:11:33 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2204D6894F;\n\tThu, 20 Mar 2025 17:11:33 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 77383617F5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 20 Mar 2025 17:11:31 +0100 (CET)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B1799220;\n\tThu, 20 Mar 2025 17:09:47 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"s7m1F7bF\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1742486987;\n\tbh=0oIn8oq90QW6BkpDTkAbQBp6jQwnxdKgpBZWmcGv5oI=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=s7m1F7bFDsF3qInGj7rl5VZ396WVQE9a1icI/OzP2MLcLVQXf1vN2baFN01mDyaab\n\tEO47mpUjLDnbf0m7P6vaKdy969E3UlyGonLvPsqTisxvT0uKAEc6gV7epbC4UX4ZJP\n\tjyAqxzaMieP8somdm5hF2D5Z4Ps/mQP6JzKYecls=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<CAEmqJPpodRfbwAcKVs_hW4AEwMYQavykE4XtYpwLYmAqL_aOSQ@mail.gmail.com>","References":"<20250320160521.301-1-laurent.pinchart@ideasonboard.com>\n\t<CAEmqJPpodRfbwAcKVs_hW4AEwMYQavykE4XtYpwLYmAqL_aOSQ@mail.gmail.com>","Subject":"Re: [PATCH] pipeline: rpi: pisp: Fix uninitialized variable warning","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tNaushir Patuck <naush@raspberrypi.com>","Date":"Thu, 20 Mar 2025 16:11:29 +0000","Message-ID":"<174248708900.783128.1144286538345783038@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]