Fix compilation warnings (apart from nanostack)

pull/8855/head
Michal Paszta 2018-11-23 10:07:32 +01:00
parent fdca1e3578
commit e101943cce
5 changed files with 5 additions and 4 deletions

View File

@ -104,7 +104,7 @@ void rf_conf_calculate_rx_filter_bandwidth_registers(uint32_t rx_bandwidth, uint
uint8_t chflt_e_tmp = 0;
uint8_t chflt_m_tmp = 0;
while (rx_bandwidth < 900000 / (2 << chflt_e_tmp)) {
while (rx_bandwidth < 900000u / (2 << chflt_e_tmp)) {
chflt_e_tmp++;
}
uint32_t rx_bandwidth_tmp = rx_bandwidth;

View File

@ -789,7 +789,7 @@ int SDBlockDevice::_cmd(SDBlockDevice::cmdSupported cmd, uint32_t arg, bool isAc
switch (cmd) {
case CMD8_SEND_IF_COND: // Response R7
debug_if(_dbg, "V2-Version Card\n");
_card_type = SDCARD_V2;
_card_type = SDCARD_V2; // fallthrough
// Note: No break here, need to read rest of the response
case CMD58_READ_OCR: // Response R3
response = (_spi.write(SPI_FILL_CHAR) << 24);

View File

@ -467,7 +467,7 @@ ssize_t ATHandler::read_string(char *buf, size_t size, bool read_even_stop_tag)
return -1;
}
int len = 0;
unsigned int len = 0;
size_t match_pos = 0;
bool delimiter_found = false;

View File

@ -27,6 +27,7 @@
#include "multicast_api.h"
#include "mac_api.h"
#include "sw_mac.h"
#include "ws_management_api.h" //ws_management_node_init
// For tracing we need to define flag, have include and define group
//#define HAVE_DEBUG

View File

@ -58,7 +58,7 @@ void mbed_error_vprintf(const char *format, va_list arg)
{
char buffer[132];
int size = vsnprintf(buffer, sizeof buffer, format, arg);
if (size >= sizeof buffer) {
if ((unsigned int)size >= sizeof buffer) {
/* Output was truncated - indicate by overwriting tail of buffer
* with ellipsis, newline and null terminator.
*/