diff options
author | Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> | 2021-07-09 11:08:50 +0200 |
---|---|---|
committer | Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> | 2021-07-19 12:26:24 +0200 |
commit | 2e5132f005273a387cc2b341551cfb3b810b6c33 (patch) | |
tree | eef7eaf378488229242608ded5080585706f0768 | |
parent | 35eb0e76a291ec2e13dd653ebe1af8cfbbfcd147 (diff) | |
download | neard-2e5132f005273a387cc2b341551cfb3b810b6c33.tar.gz |
nfctool: fix adapter_print_info() cast-function-type
Fix on GCC v10:
tools/nfctool/adapter.c: In function ‘adapter_idx_print_info’:
tools/nfctool/adapter.c:139:29: error: cast between incompatible function types from ‘void (*)(struct nfc_adapter *)’ to ‘void (*)(void *, void *)’ [-Werror=cast-function-type]
139 | g_slist_foreach(adapters, (GFunc)adapter_print_info, NULL);
| ^
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
-rw-r--r-- | tools/nfctool/adapter.c | 4 | ||||
-rw-r--r-- | tools/nfctool/adapter.h | 2 | ||||
-rw-r--r-- | tools/nfctool/main.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/tools/nfctool/adapter.c b/tools/nfctool/adapter.c index 453c2c0..5e3bf41 100644 --- a/tools/nfctool/adapter.c +++ b/tools/nfctool/adapter.c @@ -78,7 +78,7 @@ void adpater_print_targets(struct nfc_adapter *adapter, gchar *prefix) printf("]\n"); } -void adapter_print_info(struct nfc_adapter *adapter) +void adapter_print_info(struct nfc_adapter *adapter, gpointer user_data) { gchar *rf_mode_str; @@ -134,7 +134,7 @@ void adapter_print_info(struct nfc_adapter *adapter) void adapter_idx_print_info(guint32 idx) { if (idx != INVALID_ADAPTER_IDX) - adapter_print_info(adapter_get(idx)); + adapter_print_info(adapter_get(idx), NULL); else g_slist_foreach(adapters, (GFunc)adapter_print_info, NULL); } diff --git a/tools/nfctool/adapter.h b/tools/nfctool/adapter.h index c22ded8..d2707ca 100644 --- a/tools/nfctool/adapter.h +++ b/tools/nfctool/adapter.h @@ -52,7 +52,7 @@ int adapter_all_get_devices(void); void adapter_idx_print_info(guint32 idx); -void adapter_print_info(struct nfc_adapter *adapter); +void adapter_print_info(struct nfc_adapter *adapter, gpointer user_data); void adpater_print_targets(struct nfc_adapter *adapter, gchar *prefix); diff --git a/tools/nfctool/main.c b/tools/nfctool/main.c index c9a236f..c48bf09 100644 --- a/tools/nfctool/main.c +++ b/tools/nfctool/main.c @@ -118,7 +118,7 @@ static int nfctool_set_params(void) nl_get_params(adapter); - adapter_print_info(adapter); + adapter_print_info(adapter, NULL); exit: return err; |