@@ -138,7 +138,7 @@ void HCIClass::poll(unsigned long timeout)
138138 while (HCITransport.available ()) {
139139 byte b = HCITransport.read ();
140140
141- if (_recvIndex >= sizeof (_recvBuffer)) {
141+ if (_recvIndex >= ( int ) sizeof (_recvBuffer)) {
142142 _recvIndex = 0 ;
143143 if (_debug) {
144144 _debug->println (" _recvBuffer overflow" );
@@ -461,6 +461,8 @@ int HCIClass::leConnUpdate(uint16_t handle, uint16_t minInterval, uint16_t maxIn
461461 return sendCommand (OGF_LE_CTL << 10 | OCF_LE_CONN_UPDATE, sizeof (leConnUpdateData), &leConnUpdateData);
462462}
463463void HCIClass::saveNewAddress (uint8_t addressType, uint8_t * address, uint8_t * peerIrk, uint8_t * localIrk){
464+ (void )addressType;
465+ (void )localIrk;
464466 if (_storeIRK!=0 ){
465467 _storeIRK (address, peerIrk);
466468 }
@@ -503,6 +505,7 @@ int HCIClass::leStartResolvingAddresses(){
503505 return HCI.sendCommand (OGF_LE_CTL << 10 | 0x2D , 1 ,&enable); // Disable address resolution
504506}
505507int HCIClass::leReadPeerResolvableAddress (uint8_t peerAddressType, uint8_t * peerIdentityAddress, uint8_t * peerResolvableAddress){
508+ (void )peerResolvableAddress;
506509 struct __attribute__ ((packed)) Request {
507510 uint8_t addressType;
508511 uint8_t identityAddress[6 ];
@@ -546,7 +549,7 @@ int HCIClass::readStoredLK(uint8_t BD_ADDR[], uint8_t read_all ){
546549 struct __attribute__ ((packed)) Request {
547550 uint8_t BD_ADDR[6 ];
548551 uint8_t read_a;
549- } request = {0 ,0 };
552+ } request = {{ 0 } ,0 };
550553 for (int i=0 ; i<6 ; i++) request.BD_ADDR [5 -i] = BD_ADDR[i];
551554 request.read_a = read_all;
552555 return sendCommand (OGF_HOST_CTL << 10 | 0xD , sizeof (request), &request);
@@ -1268,7 +1271,7 @@ void HCIClass::handleEventPkt(uint8_t /*plen*/, uint8_t pdata[])
12681271 uint8_t U[32 ];
12691272 uint8_t V[32 ];
12701273 uint8_t Z;
1271- } f4Params = {0 , 0 ,Z};
1274+ } f4Params = {{ 0 },{ 0 } ,Z};
12721275 for (int i=0 ; i<32 ; i++){
12731276 f4Params.U [31 -i] = pairingPublicKey.publicKey [i];
12741277 f4Params.V [31 -i] = HCI.remotePublicKeyBuffer [i];
@@ -1288,7 +1291,7 @@ void HCIClass::handleEventPkt(uint8_t /*plen*/, uint8_t pdata[])
12881291#endif
12891292
12901293 uint8_t cb_temp[sizeof (pairingConfirm.cb )];
1291- for (int i=0 ; i<sizeof (pairingConfirm.cb );i++){
1294+ for (unsigned int i=0 ; i<sizeof (pairingConfirm.cb );i++){
12921295 cb_temp[sizeof (pairingConfirm.cb )-1 -i] = pairingConfirm.cb [i];
12931296 }
12941297 // / cb wa back to front.
@@ -1372,11 +1375,12 @@ void HCIClass::handleEventPkt(uint8_t /*plen*/, uint8_t pdata[])
13721375 }
13731376}
13741377int HCIClass::leEncrypt (uint8_t * key, uint8_t * plaintext, uint8_t * status, uint8_t * ciphertext){
1378+ (void )status;
13751379 struct __attribute__ ((packed)) LeEncryptCommand
13761380 {
13771381 uint8_t key[16 ];
13781382 uint8_t plaintext[16 ];
1379- } leEncryptCommand = {0 , 0 };
1383+ } leEncryptCommand = {{ 0 },{ 0 } };
13801384 for (int i=0 ; i<16 ; i++){
13811385 leEncryptCommand.key [15 -i] = key[i];
13821386 leEncryptCommand.plaintext [15 -i] = plaintext[i];
0 commit comments