aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>2021-07-09 11:11:06 +0200
committerKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>2021-07-19 12:26:24 +0200
commit20892f4276bdbee150e6b30b9e4897c9332bc667 (patch)
tree32c81ee80b2aa295309cd9f8ca1c852384a71f12
parent43ebc502616640cfd2aa42c83191c7f7b57ad655 (diff)
downloadneard-20892f4276bdbee150e6b30b9e4897c9332bc667.tar.gz
nfctool: fix nfctool_print_and_remove_snl() cast-function-type
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@canonical.com>
-rw-r--r--tools/nfctool/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/nfctool/main.c b/tools/nfctool/main.c
index 282df51..72a39de 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);