@@ -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);
@@ -1269,7 +1272,7 @@ void HCIClass::handleEventPkt(uint8_t /*plen*/, uint8_t pdata[])
12691272            uint8_t  U[32 ];
12701273            uint8_t  V[32 ];
12711274            uint8_t  Z;
1272-           } f4Params = {0 , 0 ,Z};
1275+           } f4Params = {{ 0 },{ 0 } ,Z};
12731276          for (int  i=0 ; i<32 ; i++){
12741277            f4Params.U [31 -i] = pairingPublicKey.publicKey [i];
12751278            f4Params.V [31 -i] = HCI.remotePublicKeyBuffer [i];
@@ -1289,7 +1292,7 @@ void HCIClass::handleEventPkt(uint8_t /*plen*/, uint8_t pdata[])
12891292#endif 
12901293
12911294          uint8_t  cb_temp[sizeof (pairingConfirm.cb )];
1292-           for (int  i=0 ; i<sizeof (pairingConfirm.cb );i++){
1295+           for (unsigned   int  i=0 ; i<sizeof (pairingConfirm.cb );i++){
12931296            cb_temp[sizeof (pairingConfirm.cb )-1 -i] = pairingConfirm.cb [i];
12941297          }
12951298          // / cb wa back to front.
@@ -1373,11 +1376,12 @@ void HCIClass::handleEventPkt(uint8_t /*plen*/, uint8_t pdata[])
13731376  }
13741377}
13751378int  HCIClass::leEncrypt (uint8_t * key, uint8_t * plaintext, uint8_t * status, uint8_t * ciphertext){
1379+   (void )status;
13761380  struct  __attribute__  ((packed)) LeEncryptCommand
13771381  {
13781382    uint8_t  key[16 ];
13791383    uint8_t  plaintext[16 ];
1380-   } leEncryptCommand = {0 , 0 };
1384+   } leEncryptCommand = {{ 0 },{ 0 } };
13811385  for (int  i=0 ; i<16 ; i++){
13821386    leEncryptCommand.key [15 -i] = key[i];
13831387    leEncryptCommand.plaintext [15 -i] = plaintext[i];
0 commit comments