aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>2021-07-09 11:06:32 +0200
committerKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>2021-07-19 12:26:24 +0200
commit35eb0e76a291ec2e13dd653ebe1af8cfbbfcd147 (patch)
tree7cd9eb90f3cc47ff9dd65a7269050252a9eec76c
parent83c94ba6a3d97569109ef52cbab17edd06e323d0 (diff)
downloadneard-35eb0e76a291ec2e13dd653ebe1af8cfbbfcd147.tar.gz
nfctool: fix adapter_print_target() cast-function-type
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@canonical.com>
-rw-r--r--tools/nfctool/adapter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/nfctool/adapter.c b/tools/nfctool/adapter.c
index 5a0c34a..453c2c0 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)