mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +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:
@@ -29,6 +29,10 @@
|
||||
#include "test-device-fake.h"
|
||||
#include "fp-print-private.h"
|
||||
|
||||
/* gcc 12.0.1 is complaining about dangling pointers in the auto_close* functions */
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdangling-pointer"
|
||||
|
||||
/* Utility functions */
|
||||
|
||||
typedef FpDevice FpAutoCloseDevice;
|
||||
@@ -65,6 +69,8 @@ auto_close_fake_device_free (FpAutoCloseDevice *device)
|
||||
}
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FpAutoCloseDevice, auto_close_fake_device_free)
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
typedef FpDeviceClass FpAutoResetClass;
|
||||
static FpAutoResetClass default_fake_dev_class = {0};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user