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