[libcamera-devel] [PATCH 2/2] simple-cam: Use matching type to store stream size
Dorota Czaplejewicz
dorota.czaplejewicz at puri.sm
Mon Sep 27 17:54:37 CEST 2021
Hi Laurent,
On Sun, 26 Sep 2021 23:41:58 +0300
Laurent Pinchart <laurent.pinchart at ideasonboard.com> wrote:
> Hi Dorota,
>
> Thank you for the patch.
>
> On Sun, Sep 26, 2021 at 11:33:19PM +0300, Laurent Pinchart wrote:
> > From: Dorota Czaplejewicz <dorota.czaplejewicz at puri.sm>
>
> We usually try to have a commit message body, even for simple patches.
Sorry, I didn't realize that. I'm used to coming up with a sufficient explanation and then putting it in the first line if it fits.
> This could be
>
> The std::vector::size() function returns a size_t. Use the same type of
> the variable that stores the return value to avoid a compiler warning.
>
> I'll let Kieran apply the patches, I'm sure he can update the commit
> message with the above text (if you're fine with it).
>
I don't mind at all, go ahead.
Cheers,
Dorota
> > Signed-off-by: Dorota Czaplejewicz <dorota.czaplejewicz at puri.sm>
> > ---
> > simple-cam.cpp | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/simple-cam.cpp b/simple-cam.cpp
> > index 350f68be7906..e374e45849dc 100644
> > --- a/simple-cam.cpp
> > +++ b/simple-cam.cpp
> > @@ -299,7 +299,7 @@ int main()
> > return EXIT_FAILURE;
> > }
> >
> > - unsigned int allocated = allocator->buffers(cfg.stream()).size();
> > + size_t allocated = allocator->buffers(cfg.stream()).size();
> > std::cout << "Allocated " << allocated << " buffers for stream" << std::endl;
> > }
> >
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20210927/d4786e0f/attachment.sig>
More information about the libcamera-devel
mailing list