Fix on GCC v10:
tools/nfctool/main.c: In function ‘nfctool_snl_cb’:
tools/nfctool/main.c:352:30: error: cast between incompatible function types from
‘void (*)(struct nfc_snl *, guint32)’ {aka ‘void (*)(struct nfc_snl *, unsigned int)’} to
‘void (*)(void *, void *)’ [-Werror=cast-function-type]
352 | g_slist_foreach(sdres_list, (GFunc)nfctool_print_and_remove_snl,
| ^
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski(a)canonical.com>
---
tools/nfctool/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/nfctool/main.c b/tools/nfctool/main.c
index 282df519fcc8..72a39de3ccbf 100644
--- a/tools/nfctool/main.c
+++ b/tools/nfctool/main.c
@@ -325,13 +325,13 @@ static int nfctool_poll_cb(guint8 cmd, guint32 idx, gpointer data)
}
static void nfctool_print_and_remove_snl(struct nfc_snl *sdres,
- guint32 adapter_idx)
+ gpointer adapter_idx)
{
GSList *elem;
printf(" uri: %s - sap: %d\n", sdres->uri, sdres->sap);
- if (adapter_idx == opts.adapter_idx) {
+ if (GPOINTER_TO_UINT(adapter_idx) == opts.adapter_idx) {
elem = g_slist_find_custom(opts.snl_list, sdres->uri,
(GCompareFunc)g_strcmp0);
--
2.27.0