From f2b10afa35eddf96eaef3c6bdb757a7d801ac8fb Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Thu, 3 Mar 2016 17:07:50 -0700 Subject: [PATCH] pn532: fix a couple more narrowing conversions (c++11) Signed-off-by: Jon Trulson Signed-off-by: Mihai Tudor Panu --- src/pn532/pn532.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pn532/pn532.cxx b/src/pn532/pn532.cxx index d0e7b221..2ac512d2 100644 --- a/src/pn532/pn532.cxx +++ b/src/pn532/pn532.cxx @@ -995,7 +995,8 @@ bool PN532::mifareclassic_WriteNDEFURI (uint8_t sectorNumber, // Setup the sector buffer (w/pre-formatted TLV wrapper and NDEF message) uint8_t sectorbuffer1[16] = {0x00, 0x00, 0x03, static_cast(len+5), 0xD1, 0x01, static_cast(len+1), - 0x55, uriIdentifier, 0x00, 0x00, 0x00, 0x00, + 0x55, static_cast(uriIdentifier), + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; uint8_t sectorbuffer2[16] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -1337,7 +1338,7 @@ bool PN532::ntag2xx_WriteNDEFURI (NDEF_URI_T uriIdentifier, char * url, 0x01, /* Type Length for the record type indicator */ static_cast(len+1), /* Payload len */ 0x55, /* Record Type Indicator (0x55 or 'U' = URI Record) */ - uriIdentifier /* URI Prefix (ex. 0x01 = "http://www.") */ + static_cast(uriIdentifier) /* URI Prefix (ex. 0x01 = "http://www.") */ }; // Write 12 byte header (three pages of data starting at page 4)