@@ -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);
@@ -1271,7 +1274,7 @@ void HCIClass::handleEventPkt(uint8_t /*plen*/, uint8_t pdata[])
12711274 uint8_t U[32 ];
12721275 uint8_t V[32 ];
12731276 uint8_t Z;
1274- } f4Params = {0 , 0 ,Z};
1277+ } f4Params = {{ 0 },{ 0 } ,Z};
12751278 for (int i=0 ; i<32 ; i++){
12761279 f4Params.U [31 -i] = pairingPublicKey.publicKey [i];
12771280 f4Params.V [31 -i] = HCI.remotePublicKeyBuffer [i];
@@ -1291,7 +1294,7 @@ void HCIClass::handleEventPkt(uint8_t /*plen*/, uint8_t pdata[])
12911294#endif
12921295
12931296 uint8_t cb_temp[sizeof (pairingConfirm.cb )];
1294- for (int i=0 ; i<sizeof (pairingConfirm.cb );i++){
1297+ for (unsigned int i=0 ; i<sizeof (pairingConfirm.cb );i++){
12951298 cb_temp[sizeof (pairingConfirm.cb )-1 -i] = pairingConfirm.cb [i];
12961299 }
12971300 // / cb wa back to front.
@@ -1375,11 +1378,12 @@ void HCIClass::handleEventPkt(uint8_t /*plen*/, uint8_t pdata[])
13751378 }
13761379}
13771380int HCIClass::leEncrypt (uint8_t * key, uint8_t * plaintext, uint8_t * status, uint8_t * ciphertext){
1381+ (void )status;
13781382 struct __attribute__ ((packed)) LeEncryptCommand
13791383 {
13801384 uint8_t key[16 ];
13811385 uint8_t plaintext[16 ];
1382- } leEncryptCommand = {0 , 0 };
1386+ } leEncryptCommand = {{ 0 },{ 0 } };
13831387 for (int i=0 ; i<16 ; i++){
13841388 leEncryptCommand.key [15 -i] = key[i];
13851389 leEncryptCommand.plaintext [15 -i] = plaintext[i];
0 commit comments