[linux-nfc] [neard][PATCH v2 06/73] nfctool: fix nfctool_send_dep_link_up() cast-function-type

Krzysztof Kozlowski <[email protected]> Mon, 19 Jul 2021 13:07:12 +0200
Newsgroups org.01.lists.linux-nfc,dev.linux.lists.oe-linux-nfc
Message-ID <[email protected]>
Fix on GCC v10:

    tools/nfctool/main.c: In function ‘nfctool_targets_found’:
    tools/nfctool/main.c:294:5: error: cast between incompatible function types from ‘void (*)(guint32,  guint32)’ {aka ‘void (*)(unsigned int,  unsigned int)’} to ‘void (*)(void *, void *)’ [-Werror=cast-function-type]
      294 |     (GFunc)nfctool_send_dep_link_up,
          |     ^

Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
 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 c48bf0919657..282df519fcc8 100644
--- a/tools/nfctool/main.c
+++ b/tools/nfctool/main.c
@@ -259,9 +259,9 @@ static int nfctool_snl(void)
 	return nfctool_snl_send_request(adapter);
 }
 
-static void nfctool_send_dep_link_up(guint32 target_idx, guint32 adapter_idx)
+static void nfctool_send_dep_link_up(gpointer target_idx, gpointer adapter_idx)
 {
-	nl_send_dep_link_up(adapter_idx, target_idx);
+	nl_send_dep_link_up(GPOINTER_TO_INT(adapter_idx), GPOINTER_TO_INT(target_idx));
 }
 
 static int nfctool_targets_found(guint32 adapter_idx)
-- 
2.27.0
_______________________________________________
Linux-nfc mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s