@@ -139,7 +139,7 @@ void HCIClass::poll(unsigned long timeout)
139139 while (HCITransport.available ()) {
140140 byte b = HCITransport.read ();
141141
142- if (_recvIndex >= sizeof (_recvBuffer)) {
142+ if (_recvIndex >= ( int ) sizeof (_recvBuffer)) {
143143 _recvIndex = 0 ;
144144 if (_debug) {
145145 _debug->println (" _recvBuffer overflow" );
@@ -462,6 +462,8 @@ int HCIClass::leConnUpdate(uint16_t handle, uint16_t minInterval, uint16_t maxIn
462462 return sendCommand (OGF_LE_CTL << 10 | OCF_LE_CONN_UPDATE, sizeof (leConnUpdateData), &leConnUpdateData);
463463}
464464void HCIClass::saveNewAddress (uint8_t addressType, uint8_t * address, uint8_t * peerIrk, uint8_t * localIrk){
465+ (void )addressType;
466+ (void )localIrk;
465467 if (_storeIRK!=0 ){
466468 _storeIRK (address, peerIrk);
467469 }
@@ -504,6 +506,7 @@ int HCIClass::leStartResolvingAddresses(){
504506 return HCI.sendCommand (OGF_LE_CTL << 10 | 0x2D , 1 ,&enable); // Disable address resolution
505507}
506508int HCIClass::leReadPeerResolvableAddress (uint8_t peerAddressType, uint8_t * peerIdentityAddress, uint8_t * peerResolvableAddress){
509+ (void )peerResolvableAddress;
507510 struct __attribute__ ((packed)) Request {
508511 uint8_t addressType;
509512 uint8_t identityAddress[6 ];
@@ -547,7 +550,7 @@ int HCIClass::readStoredLK(uint8_t BD_ADDR[], uint8_t read_all ){
547550 struct __attribute__ ((packed)) Request {
548551 uint8_t BD_ADDR[6 ];
549552 uint8_t read_a;
550- } request = {0 ,0 };
553+ } request = {{ 0 } ,0 };
551554 for (int i=0 ; i<6 ; i++) request.BD_ADDR [5 -i] = BD_ADDR[i];
552555 request.read_a = read_all;
553556 return sendCommand (OGF_HOST_CTL << 10 | 0xD , sizeof (request), &request);
@@ -1272,7 +1275,7 @@ void HCIClass::handleEventPkt(uint8_t /*plen*/, uint8_t pdata[])
12721275 uint8_t U[32 ];
12731276 uint8_t V[32 ];
12741277 uint8_t Z;
1275- } f4Params = {0 , 0 ,Z};
1278+ } f4Params = {{ 0 },{ 0 } ,Z};
12761279 for (int i=0 ; i<32 ; i++){
12771280 f4Params.U [31 -i] = pairingPublicKey.publicKey [i];
12781281 f4Params.V [31 -i] = HCI.remotePublicKeyBuffer [i];
@@ -1292,7 +1295,7 @@ void HCIClass::handleEventPkt(uint8_t /*plen*/, uint8_t pdata[])
12921295#endif
12931296
12941297 uint8_t cb_temp[sizeof (pairingConfirm.cb )];
1295- for (int i=0 ; i<sizeof (pairingConfirm.cb );i++){
1298+ for (unsigned int i=0 ; i<sizeof (pairingConfirm.cb );i++){
12961299 cb_temp[sizeof (pairingConfirm.cb )-1 -i] = pairingConfirm.cb [i];
12971300 }
12981301 // / cb wa back to front.
@@ -1376,11 +1379,12 @@ void HCIClass::handleEventPkt(uint8_t /*plen*/, uint8_t pdata[])
13761379 }
13771380}
13781381int HCIClass::leEncrypt (uint8_t * key, uint8_t * plaintext, uint8_t * status, uint8_t * ciphertext){
1382+ (void )status;
13791383 struct __attribute__ ((packed)) LeEncryptCommand
13801384 {
13811385 uint8_t key[16 ];
13821386 uint8_t plaintext[16 ];
1383- } leEncryptCommand = {0 , 0 };
1387+ } leEncryptCommand = {{ 0 },{ 0 } };
13841388 for (int i=0 ; i<16 ; i++){
13851389 leEncryptCommand.key [15 -i] = key[i];
13861390 leEncryptCommand.plaintext [15 -i] = plaintext[i];
0 commit comments