mirror of
https://github.com/h2zero/esp-nimble-cpp.git
synced 2024-12-18 01:00:47 +01:00
Silence compiler warnings
This commit is contained in:
parent
62de1b23fa
commit
af1872623e
2 changed files with 4 additions and 4 deletions
|
@ -223,7 +223,7 @@ bool NimBLEAdvertisementData::removeServiceUUID(const NimBLEUUID& serviceUUID) {
|
|||
}
|
||||
|
||||
int uuidLoc = -1;
|
||||
for (int i = dataLoc + 2; i < m_payload.size(); i += bytes) {
|
||||
for (size_t i = dataLoc + 2; i < m_payload.size(); i += bytes) {
|
||||
if (memcmp(&m_payload[i], serviceUUID.getValue(), bytes) == 0) {
|
||||
uuidLoc = i;
|
||||
break;
|
||||
|
@ -519,7 +519,7 @@ bool NimBLEAdvertisementData::setServiceData(const NimBLEUUID& uuid, const std::
|
|||
* @return -1 if the data is not found, otherwise the index of the data in the payload.
|
||||
*/
|
||||
int NimBLEAdvertisementData::getDataLocation(uint8_t type) const {
|
||||
int index = 0;
|
||||
size_t index = 0;
|
||||
while (index < m_payload.size()) {
|
||||
if (m_payload[index + 1] == type) {
|
||||
return index;
|
||||
|
|
|
@ -765,7 +765,7 @@ bool NimBLEExtAdvertisement::removeServiceUUID(const NimBLEUUID& serviceUUID) {
|
|||
}
|
||||
|
||||
int uuidLoc = -1;
|
||||
for (int i = dataLoc + 2; i < m_payload.size(); i += bytes) {
|
||||
for (size_t i = dataLoc + 2; i < m_payload.size(); i += bytes) {
|
||||
if (memcmp(&m_payload[i], serviceUUID.getValue(), bytes) == 0) {
|
||||
uuidLoc = i;
|
||||
break;
|
||||
|
@ -1019,7 +1019,7 @@ void NimBLEExtAdvertisement::addTxPower() {
|
|||
* @return -1 if the data is not found, otherwise the index of the data in the payload.
|
||||
*/
|
||||
int NimBLEExtAdvertisement::getDataLocation(uint8_t type) const {
|
||||
int index = 0;
|
||||
size_t index = 0;
|
||||
while (index < m_payload.size()) {
|
||||
if (m_payload[index + 1] == type) {
|
||||
return index;
|
||||
|
|
Loading…
Reference in a new issue