fix warnings while building along with serial recovery

Following warnings were fixed within this patch:

 'isspace' macro should take an int value

 function 'bs_reset' should return void

 redefinition of 'MBEDTLS_CONFIG_FILE' macro while
 it is already defined by the zephyr build system.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
This commit is contained in:
Andrzej Puzdrowski 2018-04-10 12:57:54 +02:00 committed by Fabio Utzig
parent 8a67dba367
commit 268cdd0e09
2 changed files with 2 additions and 4 deletions

View File

@ -118,7 +118,7 @@ bs_find_val(char *buf, char *name)
ptr += strlen(name);
while (*ptr != '\0') {
if (*ptr != ':' && !isspace(*ptr)) {
if (*ptr != ':' && !isspace((int)*ptr)) {
break;
}
++ptr;
@ -292,7 +292,7 @@ bs_echo_ctl(char *buf, int len)
* Reset, and (presumably) boot to newly uploaded image. Flush console
* before restarting.
*/
static int
static void
bs_reset(char *buf, int len)
{
cbor_encoder_create_map(&bs_root, &bs_rsp, CborIndefiniteLength);

View File

@ -23,7 +23,6 @@
#include "os/os_heap.h"
#ifdef MCUBOOT_USE_MBED_TLS
#define MBEDTLS_CONFIG_FILE CONFIG_MBEDTLS_CFG_FILE
#include <mbedtls/platform.h>
#include <mbedtls/memory_buffer_alloc.h>
@ -45,7 +44,6 @@ void os_heap_init(void)
mbedtls_memory_buffer_alloc_init(mempool, sizeof(mempool));
}
#else
#define MBEDTLS_CONFIG_FILE MCUBOOT_MBEDTLS_CFG_FILE
void os_heap_init(void)
{
}