[libcamera-devel] [PATCH] ipa: ipu3: Fix struct/class mismatch in forward declaration

Hirokazu Honda hiroh at chromium.org
Wed Jun 9 05:22:36 CEST 2021


Hi Laurent, thank you for the patch.

On Wed, Jun 9, 2021 at 11:26 AM <paul.elder at ideasonboard.com> wrote:

> Hi Laurent,
>
> On Wed, Jun 09, 2021 at 12:27:14AM +0300, Laurent Pinchart wrote:
> > The ipu3_agc.h forward-declares the IPACameraSensorInfo structure, but
> > incorrectly declares it as a class. This causes a compilation error with
> > clang:
> >
> > include/libcamera/ipa/core_ipa_interface.h:24:1: error:
> 'IPACameraSensorInfo' defined as a struct here but previously declared as a
> class; this is valid, but may result in linker errors under the Microsoft
> C++ ABI [-Werror,-Wmismatched-tags]
> > struct IPACameraSensorInfo
> > ^
> > ../../src/ipa/ipu3/ipu3_agc.h:21:1: note: did you mean struct here?
> > class IPACameraSensorInfo;
> > ^~~~~
> > struct
> >
> > Fix it.
> >
> > Fixes: 384a53d3cdf7 ("ipa: ipu3: Calculate line duration from
> IPACameraSensorInfo")
> > Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
>
> Reviewed-by: Paul Elder <paul.elder at ideasonboard.com>
>
>
Reviewed-by: Hirokazu Honda <hiroh at chromium.org>


> > ---
> >  src/ipa/ipu3/ipu3_agc.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/src/ipa/ipu3/ipu3_agc.h b/src/ipa/ipu3/ipu3_agc.h
> > index 99a582a9fdcf..f3d4055761e6 100644
> > --- a/src/ipa/ipu3/ipu3_agc.h
> > +++ b/src/ipa/ipu3/ipu3_agc.h
> > @@ -18,7 +18,7 @@
> >
> >  namespace libcamera {
> >
> > -class IPACameraSensorInfo;
> > +struct IPACameraSensorInfo;
> >
> >  namespace ipa::ipu3 {
> >
> > --
> > Regards,
> >
> > Laurent Pinchart
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20210609/89a323d6/attachment.htm>


More information about the libcamera-devel mailing list