From cc7c0c32f1eb54677ac85d2f4bc0bc2366ef98ef Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Tue, 2 Jul 2013 22:44:55 +0200 Subject: [PATCH] Fix warning about incompatible types pn53x.c:85:57: warning: Result of 'malloc' is converted to a pointer of type 'nfc_modulation_type', which is incompatible with sizeof operand type 'nfc_modulation' CHIP_DATA(pnd)->supported_modulation_as_initiator = malloc(sizeof(nfc_modulation) * 9); ^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~ --- libnfc/chips/pn53x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libnfc/chips/pn53x.c b/libnfc/chips/pn53x.c index 04af6dc..b407401 100644 --- a/libnfc/chips/pn53x.c +++ b/libnfc/chips/pn53x.c @@ -82,7 +82,7 @@ pn53x_init(struct nfc_device *pnd) } if (!CHIP_DATA(pnd)->supported_modulation_as_initiator) { - CHIP_DATA(pnd)->supported_modulation_as_initiator = malloc(sizeof(nfc_modulation) * 9); + CHIP_DATA(pnd)->supported_modulation_as_initiator = malloc(sizeof(nfc_modulation_type) * 9); if (! CHIP_DATA(pnd)->supported_modulation_as_initiator) return NFC_ESOFT; int nbSupportedModulation = 0;