diff --git a/cpu/msp430_common/include/cpu_conf.h b/cpu/msp430_common/include/cpu_conf.h index 33a12cb858..67b9ec4130 100644 --- a/cpu/msp430_common/include/cpu_conf.h +++ b/cpu/msp430_common/include/cpu_conf.h @@ -26,11 +26,11 @@ extern "C" { * @name Configure the internal flash memory * @{ */ -#define FLASHPAGE_SIZE (512) +#define FLASHPAGE_SIZE (512U) #if defined (CPU_MODEL_MSP430F1611) #define CPU_FLASH_BASE (0x4000) -#define FLASHPAGE_NUMOF (96) /* 48K */ +#define FLASHPAGE_NUMOF (96U) /* 48K */ #elif defined (CPU_MODEL_MSP430F1612) #define CPU_FLASH_BASE (0x2600) /* first sector is only 256 byte, skip it*/ #define FLASHPAGE_NUMOF (109U) /* 54.5K */ @@ -39,7 +39,7 @@ extern "C" { #define FLASHPAGE_NUMOF (103U) /* we can currently only access 51.5K */ #elif defined (CPU_MODEL_CC430F6137) #define CPU_FLASH_BASE (0x8000) -#define FLASHPAGE_NUMOF (64) /* 32K */ +#define FLASHPAGE_NUMOF (64U) /* 32K */ #endif /** @} */ diff --git a/cpu/msp430_common/periph/flashpage.c b/cpu/msp430_common/periph/flashpage.c index 2d366c5b34..34151df159 100644 --- a/cpu/msp430_common/periph/flashpage.c +++ b/cpu/msp430_common/periph/flashpage.c @@ -26,7 +26,7 @@ void flashpage_write(int page, const void *data) { - assert(page < FLASHPAGE_NUMOF); + assert((unsigned) page < FLASHPAGE_NUMOF); const uint8_t *src = data; uint8_t *dst = (uint8_t *)flashpage_addr(page);