mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2026-06-11 10:34:18 +00:00
tests: Avoid -Wdangling-pointer warning
The code is correct, but gcc thinks the pointer is still NULL after the call. As obvious workaround don't seem to work, just disable the warning for now.
This commit is contained in:
committed by
Marco Trevisan (Treviño)
parent
a328dfe1d9
commit
20de7400c6
@@ -147,6 +147,10 @@ tod_check_device_version (FpDevice *device_class,
|
|||||||
|
|
||||||
typedef FpDevice FpAutoCloseDevice;
|
typedef FpDevice FpAutoCloseDevice;
|
||||||
|
|
||||||
|
/* gcc 12.0.1 is complaining about dangling pointers in the auto_close* functions */
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wdangling-pointer"
|
||||||
|
|
||||||
static FpAutoCloseDevice *
|
static FpAutoCloseDevice *
|
||||||
auto_close_fake_device_new (void)
|
auto_close_fake_device_new (void)
|
||||||
{
|
{
|
||||||
@@ -179,6 +183,8 @@ auto_close_fake_device_free (FpAutoCloseDevice *device)
|
|||||||
}
|
}
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FpAutoCloseDevice, auto_close_fake_device_free)
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FpAutoCloseDevice, auto_close_fake_device_free)
|
||||||
|
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
typedef FpDeviceClass FpAutoResetClass;
|
typedef FpDeviceClass FpAutoResetClass;
|
||||||
static FpAutoResetClass default_fake_dev_class = {0};
|
static FpAutoResetClass default_fake_dev_class = {0};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user