forked from h2zero/esp-nimble-cpp
Silence compiler warnings
This commit is contained in:
@@ -223,7 +223,7 @@ bool NimBLEAdvertisementData::removeServiceUUID(const NimBLEUUID& serviceUUID) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int uuidLoc = -1;
|
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) {
|
if (memcmp(&m_payload[i], serviceUUID.getValue(), bytes) == 0) {
|
||||||
uuidLoc = i;
|
uuidLoc = i;
|
||||||
break;
|
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.
|
* @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 NimBLEAdvertisementData::getDataLocation(uint8_t type) const {
|
||||||
int index = 0;
|
size_t index = 0;
|
||||||
while (index < m_payload.size()) {
|
while (index < m_payload.size()) {
|
||||||
if (m_payload[index + 1] == type) {
|
if (m_payload[index + 1] == type) {
|
||||||
return index;
|
return index;
|
||||||
|
@@ -765,7 +765,7 @@ bool NimBLEExtAdvertisement::removeServiceUUID(const NimBLEUUID& serviceUUID) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int uuidLoc = -1;
|
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) {
|
if (memcmp(&m_payload[i], serviceUUID.getValue(), bytes) == 0) {
|
||||||
uuidLoc = i;
|
uuidLoc = i;
|
||||||
break;
|
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.
|
* @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 NimBLEExtAdvertisement::getDataLocation(uint8_t type) const {
|
||||||
int index = 0;
|
size_t index = 0;
|
||||||
while (index < m_payload.size()) {
|
while (index < m_payload.size()) {
|
||||||
if (m_payload[index + 1] == type) {
|
if (m_payload[index + 1] == type) {
|
||||||
return index;
|
return index;
|
||||||
|
Reference in New Issue
Block a user