@@ -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);
@@ -1268,7 +1271,7 @@ void HCIClass::handleEventPkt(uint8_t /*plen*/, uint8_t pdata[])
1268
1271
uint8_t U[32 ];
1269
1272
uint8_t V[32 ];
1270
1273
uint8_t Z;
1271
- } f4Params = {0 , 0 ,Z};
1274
+ } f4Params = {{ 0 },{ 0 } ,Z};
1272
1275
for (int i=0 ; i<32 ; i++){
1273
1276
f4Params.U [31 -i] = pairingPublicKey.publicKey [i];
1274
1277
f4Params.V [31 -i] = HCI.remotePublicKeyBuffer [i];
@@ -1288,7 +1291,7 @@ void HCIClass::handleEventPkt(uint8_t /*plen*/, uint8_t pdata[])
1288
1291
#endif
1289
1292
1290
1293
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++){
1292
1295
cb_temp[sizeof (pairingConfirm.cb )-1 -i] = pairingConfirm.cb [i];
1293
1296
}
1294
1297
// / cb wa back to front.
@@ -1372,11 +1375,12 @@ void HCIClass::handleEventPkt(uint8_t /*plen*/, uint8_t pdata[])
1372
1375
}
1373
1376
}
1374
1377
int HCIClass::leEncrypt (uint8_t * key, uint8_t * plaintext, uint8_t * status, uint8_t * ciphertext){
1378
+ (void )status;
1375
1379
struct __attribute__ ((packed)) LeEncryptCommand
1376
1380
{
1377
1381
uint8_t key[16 ];
1378
1382
uint8_t plaintext[16 ];
1379
- } leEncryptCommand = {0 , 0 };
1383
+ } leEncryptCommand = {{ 0 },{ 0 } };
1380
1384
for (int i=0 ; i<16 ; i++){
1381
1385
leEncryptCommand.key [15 -i] = key[i];
1382
1386
leEncryptCommand.plaintext [15 -i] = plaintext[i];
0 commit comments