more warnings clean up

This commit is contained in:
hathach committed 2019-06-07 15:27:57 +07:00
1 parent a14c2c247e
commit 64e176b7cd
5 files changed
+10 -10

No files matched your search

@@ -144,7 +144,7 @@ void vPortSuppressTicksAndSleep( TickType_t xExpectedIdleTime )
do{
uint8_t dummy = 0;
uint32_t err_code = sd_nvic_critical_region_enter(&dummy);
//APP_ERROR_CHECK(err_code);
(void) err_code; //APP_ERROR_CHECK(err_code);
}while (0);
#else
__disable_irq();
@@ -229,7 +229,7 @@ void vPortSuppressTicksAndSleep( TickType_t xExpectedIdleTime )
}
#ifdef SOFTDEVICE_PRESENT
uint32_t err_code = sd_nvic_critical_region_exit(0);
//APP_ERROR_CHECK(err_code);
(void) err_code; //APP_ERROR_CHECK(err_code);
#else
__enable_irq();
#endif
+1 -3
View File
@@ -248,8 +248,6 @@ void dbgDumpMemoryCFormat(const char* str, void const *buf, uint16_t count)
for(uint32_t i=0; i<count; i++)
{
uint32_t value=0;
if ( i%16 == 0 )
{
if ( i != 0 ) printf(",\n ");
@@ -258,7 +256,7 @@ void dbgDumpMemoryCFormat(const char* str, void const *buf, uint16_t count)
if ( i != 0 ) printf(", ");
}
printf("0x%02lX", *buf8);
printf("0x%02X", *buf8);
buf8++;
}
+2 -2
View File
@@ -80,7 +80,7 @@ const char* getBootloaderVersion(void)
uint32_t const ver2 = (sd_version % 1000000)/1000;
uint32_t const ver3 = sd_version % 1000;
sprintf(fw_str, "s%d %d.%d.%d", sd_id, ver1, ver2, ver3);
sprintf(fw_str, "s%lu %lu.%lu.%lu", sd_id, ver1, ver2, ver3);
}
return fw_str;
@@ -93,7 +93,7 @@ const char* getMcuUniqueID(void)
// Skip if already created
if ( serial_str[0] == 0 )
{
sprintf(serial_str, "%08lX%08lX", NRF_FICR->DEVICEID[1], NRF_FICR->DEVICEID[0]);
sprintf(serial_str, "%08lu%08lu", NRF_FICR->DEVICEID[1], NRF_FICR->DEVICEID[0]);
}
return serial_str;
+4 -2
View File
@@ -887,11 +887,12 @@ void AdafruitBluefruit::_ble_handler(ble_evt_t* evt)
case BLE_GAP_EVT_PHY_UPDATE_REQUEST:
{
#if CFG_DEBUG >= 1
ble_gap_phys_t* req_phy = &evt->evt.gap_evt.params.phy_update_request.peer_preferred_phys;
char const *phy_str[] = { "Auto", "1 Mbps", "2 Mbps", "Coded" };
(void) req_phy;
(void) phy_str;
LOG_LV1("GAP", "PHY request tx: %s, rx: %s", phy_str[req_phy->tx_phys], phy_str[req_phy->rx_phys]);
#endif
// Tell SoftDevice to choose PHY automatically
ble_gap_phys_t phy = { BLE_GAP_PHY_AUTO, BLE_GAP_PHY_AUTO };
@@ -909,6 +910,7 @@ void AdafruitBluefruit::_ble_handler(ble_evt_t* evt)
}else
{
char const *phy_str[] = { "Auto", "1 Mbps", "2 Mbps", "Coded" };
(void) phy_str;
LOG_LV1("GAP", "PHY active tx: %s, rx: %s", phy_str[active_phy->tx_phy], phy_str[active_phy->rx_phy]);
}
}
@@ -254,7 +254,7 @@ void bond_print_list(uint8_t role)
char devname[len];
file.read(devname, len);
printf(" %s : %s (%d bytes)\n", file.name(), devname, file.size());
printf(" %s : %s (%lu bytes)\n", file.name(), devname, file.size());
}
}