mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
test-fpi-device: Only push pragma -wdanging-pointer in newer GCC versions
It may not be supported and warn otherwise
This commit is contained in:
committed by
Marco Trevisan
parent
5e98f10011
commit
b6223a9d0a
@@ -30,8 +30,10 @@
|
|||||||
#include "fp-print-private.h"
|
#include "fp-print-private.h"
|
||||||
|
|
||||||
/* gcc 12.0.1 is complaining about dangling pointers in the auto_close* functions */
|
/* gcc 12.0.1 is complaining about dangling pointers in the auto_close* functions */
|
||||||
|
#if G_GNUC_CHECK_VERSION (12, 0)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wdangling-pointer"
|
#pragma GCC diagnostic ignored "-Wdangling-pointer"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Utility functions */
|
/* Utility functions */
|
||||||
|
|
||||||
@@ -69,7 +71,9 @@ 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)
|
||||||
|
|
||||||
|
#if G_GNUC_CHECK_VERSION (12, 0)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
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