summaryrefslogtreecommitdiff
path: root/src/ipa/mali-c55
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2025-02-24 23:52:49 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2025-02-26 02:27:09 +0200
commit005d19a73fb5d9813e924c26f010e0117fc47568 (patch)
tree8896acabbebb4a2dd38d23e6346a50f6475d59d7 /src/ipa/mali-c55
parentd4545edb38e2e58d4231fe83f61d766ca2b730fc (diff)
libipa: awb: Fix non-virtual destructor warning in AwbStats
The AwbStats structure has virtual functions but a publicly accessible non-virtual destructors. This can cause undefined behaviour if deleting a derived class instance through a pointer to the base AwbStats class. The problem is theoretical only as no code in libcamera is expected to perform such deletion, but compilers can't know that and will emit a warning if the -Wnon-virtual-dtor option is enabled. Fixing this can be done by declaring a virtual public destructor in the AwbStats class. A more efficient alternative is to declare a protected non-virtual destructor, ensuring that instances can't be deleted through a pointer to the base class. Do so, and mark the derived RkISP1AwbStats as final to avoid the same warning. Fixes: 6f663990a0f7 ("libipa: Add AWB algorithm base class") Reported-by: Milan Zamazal <mzamazal@redhat.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com> Tested-by: Milan Zamazal <mzamazal@redhat.com>
Diffstat (limited to 'src/ipa/mali-c55')
0 files changed, 0 insertions, 0 deletions