@@ -138,7 +138,7 @@ void HCIClass::poll(unsigned long timeout)
138
138
while (HCITransport.available ()) {
139
139
byte b = HCITransport.read ();
140
140
141
- if (_recvIndex >= sizeof (_recvBuffer)) {
141
+ if (_recvIndex >= ( int ) sizeof (_recvBuffer)) {
142
142
_recvIndex = 0 ;
143
143
if (_debug) {
144
144
_debug->println (" _recvBuffer overflow" );
@@ -461,6 +461,8 @@ int HCIClass::leConnUpdate(uint16_t handle, uint16_t minInterval, uint16_t maxIn
461
461
return sendCommand (OGF_LE_CTL << 10 | OCF_LE_CONN_UPDATE, sizeof (leConnUpdateData), &leConnUpdateData);
462
462
}
463
463
void HCIClass::saveNewAddress (uint8_t addressType, uint8_t * address, uint8_t * peerIrk, uint8_t * localIrk){
464
+ (void )addressType;
465
+ (void )localIrk;
464
466
if (_storeIRK!=0 ){
465
467
_storeIRK (address, peerIrk);
466
468
}
@@ -503,6 +505,7 @@ int HCIClass::leStartResolvingAddresses(){
503
505
return HCI.sendCommand (OGF_LE_CTL << 10 | 0x2D , 1 ,&enable); // Disable address resolution
504
506
}
505
507
int HCIClass::leReadPeerResolvableAddress (uint8_t peerAddressType, uint8_t * peerIdentityAddress, uint8_t * peerResolvableAddress){
508
+ (void )peerResolvableAddress;
506
509
struct __attribute__ ((packed)) Request {
507
510
uint8_t addressType;
508
511
uint8_t identityAddress[6 ];
@@ -546,7 +549,7 @@ int HCIClass::readStoredLK(uint8_t BD_ADDR[], uint8_t read_all ){
546
549
struct __attribute__ ((packed)) Request {
547
550
uint8_t BD_ADDR[6 ];
548
551
uint8_t read_a;
549
- } request = {0 ,0 };
552
+ } request = {{ 0 } ,0 };
550
553
for (int i=0 ; i<6 ; i++) request.BD_ADDR [5 -i] = BD_ADDR[i];
551
554
request.read_a = read_all;
552
555
return sendCommand (OGF_HOST_CTL << 10 | 0xD , sizeof (request), &request);
@@ -1271,7 +1274,7 @@ void HCIClass::handleEventPkt(uint8_t /*plen*/, uint8_t pdata[])
1271
1274
uint8_t U[32 ];
1272
1275
uint8_t V[32 ];
1273
1276
uint8_t Z;
1274
- } f4Params = {0 , 0 ,Z};
1277
+ } f4Params = {{ 0 },{ 0 } ,Z};
1275
1278
for (int i=0 ; i<32 ; i++){
1276
1279
f4Params.U [31 -i] = pairingPublicKey.publicKey [i];
1277
1280
f4Params.V [31 -i] = HCI.remotePublicKeyBuffer [i];
@@ -1291,7 +1294,7 @@ void HCIClass::handleEventPkt(uint8_t /*plen*/, uint8_t pdata[])
1291
1294
#endif
1292
1295
1293
1296
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++){
1295
1298
cb_temp[sizeof (pairingConfirm.cb )-1 -i] = pairingConfirm.cb [i];
1296
1299
}
1297
1300
// / cb wa back to front.
@@ -1375,11 +1378,12 @@ void HCIClass::handleEventPkt(uint8_t /*plen*/, uint8_t pdata[])
1375
1378
}
1376
1379
}
1377
1380
int HCIClass::leEncrypt (uint8_t * key, uint8_t * plaintext, uint8_t * status, uint8_t * ciphertext){
1381
+ (void )status;
1378
1382
struct __attribute__ ((packed)) LeEncryptCommand
1379
1383
{
1380
1384
uint8_t key[16 ];
1381
1385
uint8_t plaintext[16 ];
1382
- } leEncryptCommand = {0 , 0 };
1386
+ } leEncryptCommand = {{ 0 },{ 0 } };
1383
1387
for (int i=0 ; i<16 ; i++){
1384
1388
leEncryptCommand.key [15 -i] = key[i];
1385
1389
leEncryptCommand.plaintext [15 -i] = plaintext[i];
0 commit comments