Fix on GCC v10:
tools/nfctool/adapter.c: In function ‘adpater_print_targets’:
tools/nfctool/adapter.c:69:33: error: cast between incompatible function types from
‘void (*)(guint32, gchar *)’ {aka ‘void (*)(unsigned int, char *)’} to ‘void (*)(void *,
void *)’ [-Werror=cast-function-type]
69 | g_slist_foreach(adapter->tags, (GFunc)adapter_print_target,
"tag");
| ^
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski(a)canonical.com>
---
tools/nfctool/adapter.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/nfctool/adapter.c b/tools/nfctool/adapter.c
index 5a0c34a0f28b..453c2c099009 100644
--- a/tools/nfctool/adapter.c
+++ b/tools/nfctool/adapter.c
@@ -57,9 +57,9 @@ int adapter_all_get_devices(void)
return 0;
}
-static void adapter_print_target(guint32 idx, gchar *type)
+static void adapter_print_target(gpointer idx, gchar *type)
{
- printf("%s%d ", type, idx);
+ printf("%s%d ", type, GPOINTER_TO_INT(idx));
}
void adpater_print_targets(struct nfc_adapter *adapter, gchar *prefix)
--
2.27.0